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

Common calculated measure across all (any) dimensions

$
0
0
I have a cube with 4 dimensions and I have a measure called `Transaction Count`. Now I want to calculate the `Percentage` across all the dimensions for that above measure.I also have a dimension called `Cars`. I have the count across all the `Cars` and now I have defined a calculated measure for calculating the `Percentage` of each car from the total number of transactions. But it will work only for that particular dimension.How I can create a single percentage calculated measure which can be used across all the dimensions?MDX for the calculated measure: (which is working for only Carmake dimension) CASE WHEN ISEMPTY( [MEASURES].[Trans COUNT] ) THEN 0 ELSE ([Dim Car Make].[Hierarchy].CURRENTMEMBER, [MEASURES].[FACT COLORPERFORMANCE COUNT])/ ( [DIM CAR MAKE].[CARMAKE].[(ALL)].[ALL], [MEASURES].[Trans COUNT]) ENDI already have a Trancount(1000) measure. Now I need to create a calculated measure Freq % which should be calculated across all the dimensions.[img]http://i.stack.imgur.com/iuaQO.jpg[/img]Table 1 in screenshot - you drag and drop the carmake dimension, then both Tran Count and Freq% should be calculated as per CarMake breakdown.Table 2 in screenshot - you remove CarMake and drag Quality, then both Tran Count and Freq% should be calculated as per Quality breakdown.Table 3 in screenshot - you remove Quality and drag Brand, then both Tran Count and Freq% should be calculated as per brand breakdown. [1]: http://i.stack.imgur.com/iuaQO.jpg

Viewing all articles
Browse latest Browse all 1341

Trending Articles