Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

MDX for Cube Measure Based on Dimension Value

$
0
0
I would like to create a cube measure that is based upon the value of an associated dimension field. Suppose my data is:[b]Employee---Type---Hours[/b]Rob----------Bill------10Jane---------Bill------20Fred---------Free---- 40I already have a measure called [b]Hours[/b]. I would like once called [b]Bill Hours[/b] that would return the results:[b]Hours----Bill Hours[/b]70--------30I've tried the following code but do not get the correct results:[code="other"]IIF([Billing Type].[Type].Member IS [Billing Type].[Type].&[Bill],[Measures].[Hours], 0)[/code]I would like Bill Hours to properly calculate based upon how other dimensions are added to the query.Can someone help with the correct MDX to filter by the value of the associated dimension?Rob

Viewing all articles
Browse latest Browse all 1341

Trending Articles