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;
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
Post a Comment