Rule to sum all children
Posted: Fri Mar 03, 2017 4:47 pm
Hi all,
I am new to this forum and I am glad I found this place.
I am wondering what function I can use to sum all children. in the Time dimension I have a consolidated element called 'YTD', children would be months, however the number of children changes every month, for example, in Jan, YTD have one child (Jan), in Feb YTD have 2 children (Jan/Feb), in Mar YTD have 3 children (Jan/Feb/Mar)...
In general YTD is a natural sum, but there is one account called 'Days' which pull from another cube (Jan=31, Feb=28....), however in the rule of 'Days' I don't want to put N: because I don't want the days rollup at Entity dimension, but I do want it rollup at Time dimension. hence I tried to use ConsolidateChildren function as below, but it did not work, YTD showing 0, I trace calculation, it's using the second formula, not the first one, any work around? Thanks.
['Days','YTD']=ConsolidateChildren('Time');
['Days']=DB('c.Planning',!d.Scenario,'Y' | SUBST(!d.Time,1,4),
SUBST(!d.Time,5,2),!d.Org.EM, !d.Account.Operating, !d.Currency, !d.Measure);
I am new to this forum and I am glad I found this place.
I am wondering what function I can use to sum all children. in the Time dimension I have a consolidated element called 'YTD', children would be months, however the number of children changes every month, for example, in Jan, YTD have one child (Jan), in Feb YTD have 2 children (Jan/Feb), in Mar YTD have 3 children (Jan/Feb/Mar)...
In general YTD is a natural sum, but there is one account called 'Days' which pull from another cube (Jan=31, Feb=28....), however in the rule of 'Days' I don't want to put N: because I don't want the days rollup at Entity dimension, but I do want it rollup at Time dimension. hence I tried to use ConsolidateChildren function as below, but it did not work, YTD showing 0, I trace calculation, it's using the second formula, not the first one, any work around? Thanks.
['Days','YTD']=ConsolidateChildren('Time');
['Days']=DB('c.Planning',!d.Scenario,'Y' | SUBST(!d.Time,1,4),
SUBST(!d.Time,5,2),!d.Org.EM, !d.Account.Operating, !d.Currency, !d.Measure);