Howard C. BAchtel-438731 (7/9/2014)
I am new to MDX queries and have an MDX query that runs fine:Select
[Measures].[Total Patients Waiting] on columns,
CrossJoin({[ReportDate].[ReportDate].[Report Date].&[20140401]},
{[Facility].[Facility].ALLMEMBERS}) on rows
From WaitTimeEWL
The data updates periodically (currently maximum date is 20140701) and I would like to select the maximum date.
Any suggestions would be appreciated.
You could try something like the following....
Select
[Measures].[Total Patients Waiting] on columns,
CrossJoin({[ReportDate].[ReportDate].[Report Date].LastChild },
{[Facility].[Facility].ALLMEMBERS}) on rows
From WaitTimeEWL
Depending on how you created the ReportDate dimension this should give you the right result. I tested against a dimension that included an Unknown member (a property of the dimension that you can enable if you need) and the member "Unknown" was the last child. if this happens to be the case for you, maybe the following will work
Select
[Measures].[Total Patients Waiting] on columns,
CrossJoin({[ReportDate].[ReportDate].[Report Date].LastChild.Lag(1) },
{[Facility].[Facility].ALLMEMBERS}) on rows
From WaitTimeEWL