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: 
CharlesvanDortmond
Contributor
Contributor

Cummulative Revenue in graph

Hi All,

I'm really, really new to Qlik so please excuse me if I'm asking stupid stuff 😀

I have sales data and I like to build a graph that show on the x-axis the date and on the y-axis the cummulative sales achieved until that date. 

My data looks like this

  • date: 01/01/yyyy sales: € 0
  • date: 02/01/yyyy sales: € 100
  • date: 03/01/yyyy sales: € 125
  • date: 04/01/yyyy sales: € 75 etc....

I want my graph to show the cummulative achieved result:

  • date: 01/01/yyyy sales: € 0
  • date: 02/01/yyyy sales: € 100
  • date: 03/01/yyyy sales: € 225
  • date: 04/01/yyyy sales: € 300 etc.....

Currently my graph shows total sales per day with Fx for Measures being: Sum(Order_Mgmt_Net_CLC)

Can you please give me tip's on how to build a formula that calculates cummulative value for each date?

Thank you

Regards, Charles

Charles van Dortmond
Labels (1)
2 Replies
sunny_talwar

You can check this out: RangeSum and look for the "Example with expression:" section

Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hi Charlesvan,

 

To add up to Sunny's reply:

You should use a combination between RangeSum() and Above() functions, providing the RowNo() as parameter to the Above.

The expression you want to build should look something like this:

=RangeSum(Above(Sum([Sales]),1,RowNo()))+Sum([Sales])

You'd also want to use the Date as a dimension.

 

Expected result should look like the pic below. I've separated each of the logical components in a separate measure for better assimilation:

image.png

I hope that helps!

Kind regards,

S.T.