SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
louise
Calcite | Level 5
Hi,

I have a measure that calculates the difference between two dates.
How will I get the latest date without inputting the date value so that it will automatically update the measure? I am using mdx in EG since my source is OLAP cube.

Thanks!
2 REPLIES 2
sasrac
SAS Employee
Hi,

MDX is almost like an SQL syntax.
You could try to get the max of the date.

sample:

select max(date)as date from source;
quit;

or

select distinct(max (date_column)) from table_name
sasrac
SAS Employee
you could also try this doc.

sww.sas.com/base/olap/MDX%20Tutorial.doc

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2492 views
  • 0 likes
  • 2 in conversation