Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jokamoelv227
Contributor
Contributor

accumulated revenue sum

Hi, I have a situation where I would like to have a new column in a pivot table that looks like this:

Test example Qlikview.png

The field "Avräknat i månaden" has an expression that takes selected months revenue and subtracting the previous month from it.

I would like a new column that shows the accumulated "Avräknat i månaden". Any ideas?

The formula for "Avräknat i månaden" looks like this:

if((AvslutadPeriod<max(Årmånad) and AvslutadPeriod<>0) or Segment=1000,

(

Sum({$<_Avslutad={1}>} AvslutadProjektIntäkt)

-

sum({<Årmånad={"$(vPrevMonth)"}, Månad=, _Avslutad={1}>} AvslutadProjektIntäkt)

) / 1000

I've been looking at rangesum but in order for that to work, I would need to add month to this table and I don't want that. Should I construct a for loop and go through each months result and add it?

Best regards

Jonas

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

did you try the above function with range sum?

e.g.

rangesum( above(your_expression,0,rowno()))

jokamoelv227
Contributor
Contributor
Author

Hi Dilip,

I can't do a rangesum since I dont't have any month field in the table? There is no above row.

BR
Jonas