I am attempting to pull in the most recent visit date based on a cube containing claims data and am having trouble finding the solution.I want my result set to look like this:DimAttribute1 DimAttribute2 DimAttribute3 MostRecentVisitx a f 4/14/2014x b f 9/13/2014y c g 6/30/2014If I didn't want to bring in the MostRecentVisit but all Visits it might look like this:DimAttribute1 DimAttribute2 DimAttribute3 VisitDate x a f 4/14/2014 x a f 4/01/2014 x b f 1/1/2014x b f 6/13/2014x b f 9/13/2014y c g 6/30/2014Pulling in the second results set is easy:selectNON EMPTY{ Measure.SomeMeasure} on COLUMNS,NON EMPTY{([DimAtt].[DimAttribute1].[DimAttribute1]*[DimAtt].[DimAttribute2].[DimAttribute2]*[DimAtt].[DimAttribute3].[DimAttribute3]*[Date].[VisitDate].[VisitDate])} ON ROWSFROM [MyCube]Any help is appreciated. Like I mentioned I have tried quite a few things using with no luck (TOPCOUNT, MAX functions tried but couldn't get to work right).From a SQL perspective it would be something like this but I want to learn how to properly do this in the cube:select DimAttribute1,DimAttribute2,DimAttribute3,max(VisitDate) as MostRecentVisitDatefrom TableGroup by DimAttribute1,DimAttribute2,DimAttribute3Thanks.James
↧