Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Accumulate measure in a Line Chart

Hi, Everyone.

Is there any way to replicate the line chart in this application in a cumulative version like this one?


cumulative_version.PNG


I have tried this: RangeSum(Above(Sum(evo_page_like), 0, RowNo()))


But I think I had some problem with the dimensions.


Filter Pages: A, C.


Thanks.

1 Solution

Accepted Solutions
MVP
MVP

Re: Accumulate measure in a Line Chart

Try this

Aggr(Sum(TOTAL <nome_pagina> evo_page_like) - RangeSum(Above(Sum(evo_page_like), 1, RowNo())), nome_pagina, dt_extracao_page_like)

Capture.PNG

5 Replies
dan_sullivan
Contributor II

Re: Accumulate measure in a Line Chart

Maybe reference this prior post for help?  

Line Chart: running total with multiple dimensions (month, year)

Not applicable

Re: Accumulate measure in a Line Chart

Hi, Dan.

I tried with the Aggr function, but the result was not correct. Take a look.

Aggr(RangeSum(Above(Sum(evo_page_like), 0, RowNo())), nome_pagina, dt_extracao_page_like)

cumulative_wrong.PNG

The final values ​​are correct (1053 and -451), but the others are not.


The right visualization would be:

cumulative_correct.PNG


Regards.

MVP
MVP

Re: Accumulate measure in a Line Chart

Try this

Aggr(Sum(TOTAL <nome_pagina> evo_page_like) - RangeSum(Above(Sum(evo_page_like), 1, RowNo())), nome_pagina, dt_extracao_page_like)

Capture.PNG

Not applicable

Re: Accumulate measure in a Line Chart

Hi, Sunny.

It worked.

I think understood the logic behind your expression. But can you explain it to us?

Thanks.

MVP
MVP

Re: Accumulate measure in a Line Chart

All I did is to get the overall total and subtracted the cumulative value to get the downward sloping line instead of upward sloping line.

For example

Dim,           Value,      Upward Sloping,      DownwardSloping

1,                10,           10,                               60-0 = 60

2,                20,           20,                               60-10 = 50

3,                30,           30,                               60-30 = 20