Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Let me attempt to state my problem to the best of my ability.
I have leavers by month Jan (2); Feb (1); Mar (3); Apr (None); May (4); Jun (2) and Jul (None). I would like to calculate YTD Leavers to get the following results:
Jan (2); Feb (3); Mar (6); Apr (6); May (10); Jun (12) and Jul (12)
Expression: Aggr(RangeSum(SUM({<CalYear={'$(=vCurrentYear)'}>}Leavers),
ABOVE(SUM({<CalYear={'$(=vCurrentYear)'}>}Leavers), 1, RowNo())), CalMonth)
"CalMonth" is the dimension used.
The challenge is with the month Apr and Jul where no one has left. The RangeSum expression is correct but does not reflect any value for these two months. Thereby I am unable to use the YTD Leaver count and further compute.
What is the context you are using the rangesum expression? A chart with dimension CalMonth?
Then try:
=Rangesum( Above( SUM({<CalYear={'$(=vCurrentYear)'}>}Leavers), 0,Rowno() ))
Yes, I am using it in a chart. The suggested solution did not work.
A chart with more dimensions than 1 (CalMonth)? Could you post a small sample QVW?
is your calmonth sorted properly? may be you should use a numeric month so that the above function returns the correct results..
hth
Sasi
Sorry for the delayed response. I have attached a sample QVW with a note on my expectation.