Different rules need to be taken in account for 1 measure
Posted: Wed Oct 20, 2010 2:22 pm
Hi,
we have the following challenge in our company model:
One measure KG need to be calculated by using different rules.
The activation of rules is leading by dimension elements.
Our challenge in rules:
Element FS + AREA#1 till AREA#4
['KG DAY',{'FS'}, {'AREA#1','AREA#2','AREA#3','AREA#4'}] = N:ROUNDP(if (['DAY % (REG)'] + ['CTR % (REG)'] = 0,
if (['DAY % (QAD)'] + ['CTR % (QAD)'] = 0,0,['DAY % (QAD)']),['DAY % (REG)']) * ['KG (DEM)'],0);
Element FS + AREA#5 till AREA#10
['KG DAY',{'FS'}, {'AREA#5','AREA#6','AREA#7','AREA#8','AREA#9','AREA#10'}] = N:ROUNDP(if (['DAY % (CUS)'] + ['CTR % (CUS)'] = 0,
if (['DAY % (REG)'] + ['CTR % (REG)'] = 0,0,['DAY % (REG)']),['DAY % (CUS)']) * ['KG (DEM)'],0);
The AREA elements are part of a dimension hierarchy and is not de lowest level. The total hierarchy consist out of 5 levels and Area is the 4th level.
Our calculation needs to work up to lowest level (level 0).
With the rules we don't get the right results. Results are only shown up to Area level.
Can someone give use advise?
Thanks,
Barbara
we have the following challenge in our company model:
One measure KG need to be calculated by using different rules.
The activation of rules is leading by dimension elements.
Our challenge in rules:
Element FS + AREA#1 till AREA#4
['KG DAY',{'FS'}, {'AREA#1','AREA#2','AREA#3','AREA#4'}] = N:ROUNDP(if (['DAY % (REG)'] + ['CTR % (REG)'] = 0,
if (['DAY % (QAD)'] + ['CTR % (QAD)'] = 0,0,['DAY % (QAD)']),['DAY % (REG)']) * ['KG (DEM)'],0);
Element FS + AREA#5 till AREA#10
['KG DAY',{'FS'}, {'AREA#5','AREA#6','AREA#7','AREA#8','AREA#9','AREA#10'}] = N:ROUNDP(if (['DAY % (CUS)'] + ['CTR % (CUS)'] = 0,
if (['DAY % (REG)'] + ['CTR % (REG)'] = 0,0,['DAY % (REG)']),['DAY % (CUS)']) * ['KG (DEM)'],0);
The AREA elements are part of a dimension hierarchy and is not de lowest level. The total hierarchy consist out of 5 levels and Area is the 4th level.
Our calculation needs to work up to lowest level (level 0).
With the rules we don't get the right results. Results are only shown up to Area level.
Can someone give use advise?
Thanks,
Barbara