Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
LaureDenivelle
Partner - Contributor III
Partner - Contributor III

Problem with Line chart accumulation

Hi 

I'm using Qlik Cloud and I'm just trying to make an accumulation of a amount.

Here is the Graph : 

LaureDenivelle_0-1726844688932.png

The purple line is the amount month by month and the blue one, me trying to accumulate.

The Accumulation is working fine until June 2024 then I have no idea why it's going down.

And also I don't want any line to be shown as I have 0 starting september. 

Here are the expression : 

Expr 1 : sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant)

Expr 2 (cumul) : 

RangeSum(Above( sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant), 0,1))

I've tried to put "RowNo()" instead of "1" and the result is not good : 

Capture d’écran 2024-09-20 171433.png

Could you help me please ? 

Regards

Laure 

Labels (3)
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

There is an accumulation function that can be applied to the measure, so you just need to duplicate the first line and add the accumulate modifier and tell it to do full accumulation.

If you don't want to show the zeros, you can use an if condition in the expression to only show values

eg IF(sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant)>0, sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant), null())

View solution in original post

2 Replies
Lisa_P
Employee
Employee

There is an accumulation function that can be applied to the measure, so you just need to duplicate the first line and add the accumulate modifier and tell it to do full accumulation.

If you don't want to show the zeros, you can use an if condition in the expression to only show values

eg IF(sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant)>0, sum({<Phase = {'REEL'}, TRI_GP2 = {'100','101'}, Num_Date = {">= $(=Num(YearStart(Today()))) <= $(=Num(addmonths(today(), if(day(today())<10, -2, -1))))"}>} Montant), null())

LaureDenivelle
Partner - Contributor III
Partner - Contributor III
Author

Oh god I didn't see the "full" accumulation option ... 

Thank you very much 🙂

Regards

Laure