Desktop productivity for business analysts and programmers

how to get latest date using mdx

Reply
Occasional Contributor
Posts: 10

how to get latest date using mdx

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!
SAS Employee
Posts: 16

Re: how to get latest date using mdx

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
SAS Employee
Posts: 16

Re: how to get latest date using mdx

you could also try this doc.

sww.sas.com/base/olap/MDX%20Tutorial.doc
Ask a Question
Discussion stats
  • 2 replies
  • 644 views
  • 0 likes
  • 2 in conversation