Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have the following source table:
date | quantity |
2021-01-01 | 1 |
2021-01-02 | 1 |
2021-01-03 | 4 |
2021-01-04 | 9 |
I would like to have the following table:
date | quantity | accum_quantity |
2021-01-04 | 9 | 15 |
2021-01-03 | 4 | 6 |
2021-01-02 | 1 | 2 |
2021-01-01 | 1 | 1 |
What set analysis should is use for "accum_quantity"? If the output table would be sorted by date ascending i could use the formula:
Rangesum(ABOVE(Sum(QUANTITY),0,rowno()))
The best case would be that the sum is independent from the sort order of the table...
KR
Sorry Mybad use below
RangeSum(Below(Sum(Quantity), 0, NoOfrows(TOTAL)))
try this
RangeSum(Below(Sum(Quantity), 0, RowNo(TOTAL)))
Unfortunately not:
Sorry Mybad use below
RangeSum(Below(Sum(Quantity), 0, NoOfrows(TOTAL)))
Yes, thats look about right. Thanks!
Do you also know a solution to make it sort order independent? Currently i have to use two different measures depending weather i sort by date descending or ascending.
it would be sort based on only one either ascending or descending.
yes, but if the user clicks on the column name and changes the sort order the values don't add up
is it happening to Pivot table also?
Yes, as long as the user has the ability to change the sort order, the calculations are off
Not sure on this . you may check this thread
Hope this give some insight.