6 Replies Latest reply: Oct 27, 2017 8:24 AM by Niels van Zetten

# cumulative sum in line graph Qlik Sense

Hello i have line graph that i want to make cumulative. My expression right now is.

IF((GETSELECTEDCOUNT(Jaar) OR GETSELECTEDCOUNT(Maand) OR GETSELECTEDCOUNT(Maandjaar) OR GETSELECTEDCOUNT(Kalenderdatum)) = 0,

SUM({\$ <`Type grootboek` = {'Resultaat'}, Maand =, periode_flag_current_year = {"<=\$(=MAX(previous_period_flag_current_year))"}, Jaar = {"\$(=MAX(Jaar))"}  >} Gerealiseerd) / 1000,

SUM({\$ <`Type grootboek` = {'Resultaat'}, Maand =, periode_flag_current_year = {"<=\$(=MAX(periode_flag_current_year))"}, Jaar = {"\$(=MAX(Jaar))"}  >} Gerealiseerd) / 1000

)

I know you need to a rangesum but can someone help me? Thanks already

• ###### Re: cumulative sum in line graph Qlik Sense

May be this

RangeSum(Above(

IF((GETSELECTEDCOUNT(Jaar) OR GETSELECTEDCOUNT(Maand) OR GETSELECTEDCOUNT(Maandjaar) OR GETSELECTEDCOUNT(Kalenderdatum)) = 0,

SUM({\$ <`Type grootboek` = {'Resultaat'}, Maand =, periode_flag_current_year = {"<=\$(=MAX(previous_period_flag_current_year))"}, Jaar = {"\$(=MAX(Jaar))"}  >} Gerealiseerd) / 1000,

SUM({\$ <`Type grootboek` = {'Resultaat'}, Maand =, periode_flag_current_year = {"<=\$(=MAX(periode_flag_current_year))"}, Jaar = {"\$(=MAX(Jaar))"}  >} Gerealiseerd) / 1000

), 0, RowNo()))

• ###### Re: cumulative sum in line graph Qlik Sense

This doenst work get line from 0 back.

can someone else help?