I have a cube amdz with
measures Amount
dimension Date/Date
dimension Time/FullTime
dimension Status/Status
dimension customer/customer name
I am using Pentaho/Mondrian.
Would it be possible to get the non empty measures.amount for last Date and last FullTime per status per customer name using Mondrian MDX
Sample data
Customer Name Status Date FullTime Amount
Customer1 Regular 2013-10-27 10:45:05 10.00
Customer1 Regular 2013-10-27 20:45:05 20.00
Customer1 Special 2013-10-27 24:45:05 30.00
Customer2 Regular 2013-10-27 10:45:05 10.00
Customer2 Regular 2013-10-27 20:45:05 20.00
Customer2 Special 2013-10-27 24:45:05 30.00
Customer1 Regular 2013-10-28 10:45:05 10.00
Customer1 Regular 2013-10-28 20:45:05 20.00
Customer1 Special 2013-10-28 24:45:05 30.00
Customer2 Regular 2013-10-28 10:45:05 10.00
Customer2 Regular 2013-10-28 20:45:05 20.00
Customer2 Special 2013-10-28 24:45:05 30.00
desired output
Customer1 Regular 2013-10-28 20:45:05 20.00
Customer1 Special 2013-10-28 24:45:05 30.00
Customer2 Regular 2013-10-28 20:45:05 20.00
Customer2 Special 2013-10-28 24:45:05 30.00
Any help would be highly appreciated.
Thanks,
Walter
The easiest way to implement that from my Analysis Services point of view would be to add a measure of type DateTime to the fact table, and set its aggregation function to
Max
. Then the MDX query would be straightforward, using this measure on the columns, and customer as well as status on the rows. However, I never created a Mondrian cube. Hence I am not sure if this is possible in Mondrian.