Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help with RangeSum

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.

5 Replies
swuehl
MVP
MVP

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() ))

Not applicable
Author

Yes, I am using it in a chart. The suggested solution did not work.

swuehl
MVP
MVP

A chart with more dimensions than 1 (CalMonth)? Could you post a small sample QVW?

sasiparupudi1
Master III
Master III

is your calmonth sorted properly? may be you should use a numeric month so that the above function returns the correct results..

hth

Sasi

Not applicable
Author

Sorry for the delayed response. I have attached a sample QVW with a note on my expectation.