[ad_1]
Time wanted: 10 minutes.
For instance, you can use an Quantity measure. Consider, you’ll be able to create a YTD model of any sort of measure that aggregates in totals, like Depend or Hours. Measures that calculate utilizing division, like a share, won’t calculate accurately utilizing this technique. For a YTD share, the elements (numerator and denominator) will want calculated as YTD measures. Then the YTD Proportion measure might be calculated from these elements.
In our instance, we use YTD Quantity. Under, you’ll be able to see the created YTD measure; however notice that it doesn’t but have any values.
The attribute referencing the earlier interval might be used for the rule, whereas the attribute referencing the subsequent interval might be used for the feeder. The primary interval in a yr won’t have a previousperiodYTD worth, as that’s the place we would like the YTD calculation to begin, and never pull ahead the worth from the final interval of the prior yr.
The YTD measure for a interval might want to reference the YTD measure from the earlier interval, and the common measure for a similar interval.
[‘YTD Amount’] = N: [‘Amount’] + DB(‘Instance’,!Expense Accounts,ATTRS(‘Time’, !Time, ‘previousperiodYTD’),!Model,’YTD Quantity’);
The Time dimension within the rule above references the earlier interval attribute to seize the earlier interval’s YTD worth to construct onto.
Under you’ll be able to see the YTD quantity for 2021/Feb is a complete of $10, coming from the $5 in 2021/Feb of the Quantity measure and the $5 in 2021/Jan of the YTD Quantity measure.
The values referenced within the rule have to feed the rule goal.
In different phrases, the 2 values highlighted in yellow above have to feed the worth highlighted in inexperienced.
[‘Amount’] => [‘YTD Amount’];
[‘YTD Amount’] => DB(‘Instance’,!Expense Accounts,ATTRS(‘Time’, !Time, ‘nextperiodYTD’),!Model,’YTD Quantity’);
The Time dimension within the feeder for the YTD Quantity ought to reference the attribute for the subsequent interval. However we aren’t fairly completed but. Because the worth is YTD, the 2021 consolidation needs to be set to December’s worth, not the aggregation of all the yr.
The Time dimension within the consolidation rule ought to reference the final interval of the yr. On this instance, we extract the yr from the interval and concatenate 12 onto it. An alternate technique can be to have an attribute on the Time dimension that signifies the final interval for annually within the dimension and reference that attribute.
[‘YTD Amount’] = C:
IF(ELLEV(‘Time’, !Time) = 1,
DB(‘Instance’,!Expense Accounts,SUBST(!Time, 1, 4) | ’12’,!Model,’YTD Quantity’),
STET);
[ad_2]