Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I need to accumulate from month to month the FTE values. I have taken this formula:
above(sum({<[YearMonth]=
{"$(='>=' & MonthStart(yearstart(max(YearMonth))) & '<=' & MonthEnd(Max(YearMonth)))"} >}
aggr(sum({<[YearMonth]=
{"$(='>=' & MonthStart(yearstart(max(YearMonth))) & '<=' & MonthEnd(Max(YearMonth)))"} >}
distinct FTE),
[HashCode]
)
)
This seems to accumulate only the first row. How do I get the whole bunch of month (YTD) accumulated?
The table looks like this, without "above":
Thanks, Tom
)
I got it:
rangesum(above(sum({<[YearMonth]=
{"$(='>=' & MonthStart(yearstart(max(YearMonth))) & '<=' & MonthEnd(Max(YearMonth)))"} >}
aggr(sum({<[YearMonth]=
{"$(='>=' & MonthStart(yearstart(max(YearMonth))) & '<=' & MonthEnd(Max(YearMonth)))"} >}
distinct ActiveFTE),[HashCode])), 0,RowNo()))
Here is the result:
But now I need to calculate the average over the month:
What do I need to add extra to get the average?
You could try to wrap your accumulation with another one, like:
rangeavg(above(rangesum(above(YourExpression))))
Another approach could be just to divide your accumulation-results with the month-num, like:
rangesum(above(YourExpression)) / MonthNum