I want to calculate YTD and I wrote this rules ...
Code: Select all
SKIPCHECK;
['YTD N' ] =
if(NUMBR(ATTRS('4 Time Month', !4 Time Month, 'Month Num'))=1 % (ATTRS('4 Time Month', !4 Time Month, 'Month Num')@=''),
DB('A Sales Analysis', !2 Company, !5 Version, 'MONTHLY N', !4 Time Month, !2 Application, !2 Bill To Country, !2 Territory BU, !2 BU, !2 Customer, !2 Products All, !1 A SA Measure),
DB('A Sales Analysis', !2 Company, !5 Version, 'MONTHLY N', !4 Time Month, !2 Application, !2 Bill To Country, !2 Territory BU, !2 BU, !2 Customer, !2 Products All, !1 A SA Measure)
+DB('A Sales Analysis', !2 Company, !5 Version, 'YTD N', DIMNM('4 Time Month',DIMIX('4 Time Month',!4 Time Month)-1), !2 Application, !2 Bill To Country, !2 Territory BU, !2 BU, !2 Customer, !2 Products All, !1 A SA Measure));
FEEDERS;
['MONTHLY N']=>['YTD N'];
It's a very big cube and that takes 30 seconds to refresh datas
If I put N:.... I don't have the good result....
What do you think about this rule ?
Thx...