Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Cannot return SUM as a calculated measure based on member from query

$
0
0

Apologies for the perhaps obvious solution to this, but I'm very new to MDX and OLAPs and really trying to find my way. I have a cube that has a measure dimension that derives average measures. Incrementally I'm trying to get to the solution, using SUM, and the query is as below:

WITH MEMBER MEASURES.CURRENTREGION AS 

SUM( { [Region].[County].CURRENTMEMBER }
,  [Measures].[AvgBodyworkLabourRate]) 

 SELECT  
 { [Measures].[AvgBodyworkLabourRate], [Measures].[AvgPaintworkLabourRate], MEASURES.CURRENTREGION } ON 0,
 { NonEmpty([Region].[County].Children * [Suppliers].[Company Name].Children) } ON 1
 FROM [CAR Cube] 

I'm trying to include the [Measures].[AvgBodyworkLabourRate] per Supplier Company in each row, and then also include the CURRENTREGION measure as being a SUM of all [Measures].[AvgBodyworkLabourRate] where the [Suppliers].[Company Name] is in that [Region]. The derived member seems to return the SUM of the current ROW, so the output values are equivalent.

Ultimately I'm trying to implement a PERCENT_RANK function on the REGION and COUNTRY dimensions against each measure. I would really appreciate any assistance offered, including any fast track learning resources on line.

Thanks in advance,

Sean.



Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>