mdx - ssas total calculation incorrect when using IIF in calculated member -


i cannot understand why total of calculated member displayed incorrect. how should change calculated member work correctly?

calculated member:

 create member currentcube.[measures].averagescore     iif([measures].[distance]<2001,0,[measures].[avgscore]/[measures].[date count]),  visible = 1; 

enter image description here

it seems total calculated without checking value in "averagescore" month.

thanks

if avgscore hidden measure don't want visible , if it's physical measure not calculated measure try adding before current calc:

scope([driver dim].[driver].[driver].members, [date].[month].[month].members);   [measures].[avgscore] = iif([measures].[distance]<2001,null,[measures].[avgscore]); end scope; 

that should 0 out avgscore low distance driver months grand total work right. if won't work explain avgscore further.

how many rows per driver per month there? assume more 1 otherwise tell <2001 check in sql.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -