Friday, 15 July 2011

excel - SSAS Grand Total is wrong because get value from Caclulated member -



excel - SSAS Grand Total is wrong because get value from Caclulated member -

i have 2 calculated fellow member avg weekly percentage , avg monthly percentage. weekly result

and avg monthly percentage there error on grand total because there add-on of grand total of avg weekly percent.

the real result avg(99.83%+85.59%+99.80%+100%+100%+100%) = 97.54%

but result cube (avg(99.83%+85.59%+99.80%+100%+100%+100% + 100% (from weekly grand total)) = 97.89%

for avg weekly percentage

iif( isempty([measures].[actual quantity mtd]) or [measures].[actual quantity mtd]=0 or isempty([measures].[original plan quantity mtd]) , null , iif([measures].[original plan quantity mtd] =0 or isempty([measures].[original plan quantity mtd]),null, iif( ([measures].[actual quantity mtd]-[measures].[original plan quantity mtd]) > 0 , 1 ,[measures].[actual quantity mtd]/ [measures].[original plan quantity mtd]

and avg monthly percentage

avg ( descendants([psl scenario].[psl scenario description])* descendants([plant].[plant])* descendants([finish date].[calendar],[finish date].[calendar].[month year]) , avg(([finish date].[calendar].currentmember.children), [measures].[avg weekly percentage]))

what miss?

you may have exclude 'weekly grand total' (as phone call it) calculation.

i have had situations this, tell calculation utilize values if leaf level (or particular level) of hierarchy. can this?

excel ssas mdx

No comments:

Post a Comment