Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
louisernould
Contributor III
Contributor III

Cumulative Sum order by dimension

Hi the Qlik Community !

I have a small problem and I think it's about synthax. I have a table, and I want the cumulative sum of a dimension.

On the table above, I have [Nom], and [Taille], and I want the cumulative sum of the [Taille] but order by the dimension [Nom].

I already try 2 differents things, but It's not what I want...

Nom Taille test

RangeSum(Above(Sum(Taille),0,

RowNo(total)),Nom)

If(Dimensionality()=1 ,

  Aggr(RangeSum(Above(Sum([Taille]),0,RowNo(TOTAL))),Nom) ,

    IF(Dimensionality()=0 ,

       Sum(Taille) ,RangeSum(Above(Total Sum([Taille]),0,RowNo(TOTAL)))))

WHAT I WANT

A6non666
A10oui101616
A11non112727
B3non3303
B4oui4344

If someone has the solution, he will be my hero !

Thanks

Louis

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Change the expression to if(above(total Nom)<>Nom,Taille,rangesum(above(total MySum),Taille))


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
louisernould
Contributor III
Contributor III
Author

Thank Gysbert,

actually, it's not working a 100%. With your solution, I want to keep the 'test' Dimension, and when i keep it, my culumative sum bugs and doesn't work...

Gysbert_Wassenaar

Change the expression to if(above(total Nom)<>Nom,Taille,rangesum(above(total MySum),Taille))


talk is cheap, supply exceeds demand
louisernould
Contributor III
Contributor III
Author

Thanks so much !!! It's working !! OK, you're my hero now