Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
My dataset is like below:
Year | Month | Volume |
2022 | Jan | 56471 |
2022 | Feb | 55007 |
2022 | Mar | 57326 |
2022 | Apr | 57699 |
2022 | May | 60444 |
2022 | Jun | 57500 |
2022 | Jul | 53942 |
2022 | Aug | 63657 |
2022 | Sep | 56893 |
2022 | Oct | 64409 |
2022 | Nov | 63278 |
2022 | Dec | 58469 |
I would like to use range sum to check the rolling number, while when use the rangesum() function with Alternate State, the results are not accurate,
my expression is rangesum( sum({$*[Year 1]} Volume)), where [Year 1] is my alternate state name, and results are showed as below, correct results also be listed,
Year | Month | Volume | rangesum( sum({$*[Year 1]} Volume)) | Correct Results |
2022 | Jan | 56471 | 56471 | 56471 |
2022 | Feb | 55007 | 55007 | 111478 |
2022 | Mar | 57326 | 57326 | 168804 |
2022 | Apr | 57699 | 57699 | 226503 |
2022 | May | 60444 | 60444 | 286947 |
2022 | Jun | 57500 | 57500 | 344447 |
2022 | Jul | 53942 | 53942 | 398389 |
2022 | Aug | 63657 | 63657 | 462046 |
2022 | Sep | 56893 | 56893 | 518939 |
2022 | Oct | 64409 | 64409 | 583348 |
2022 | Nov | 63278 | 63278 | 646626 |
2022 | Dec | 58469 | 58469 | 705095 |
Is there any thing I need to change in my expression?
Thanks in advance
May try this.
RangeSum(above(sum({$*[Year 1]} Volume) ,0,rowno()))
Hi Iam,
The volume column was calculated by sum({$*[Year 1]} Volume), and after I tried the expression you provided, the results are same.
Regards,
RangeSum(above(sum({$*[Year]} Volume) ,0,rowno()))
all results are displayed as 0
Simple try this RangeSum(above(sum( Volume) ,0,rowno(Total))) and tell why you need {$*[Year]. i think work without this also
Hi,
Try this:
RangeSum(above(Total sum(Volume) ,0,rowno(Total)))
Check this:
RangeSum(above(sum({$*[Year 1]} Volume) ,0,rowno(total)))
Hello @ninawang99
I assume you want to presever the cumulative number per month after you select a specified month no?
if this is the case then your expression would look something like this:
=RangeSum(
Sum([Volume]),
Above(Sum({<[Month]>}[Volume]))
)
*
Avg(1)