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

Cumulative

Dear all

Kindly help to advise how to compute cumulative sales, cost and profit in a row instead of a column

 Example :

Customer Metrics Type 31/01/21 28/02/21 31/03/21 30/04/21 31/05/21 30/06/21
A001 Sales Actual       10,000        40,000        70,000      100,000      130,000      160,000
A001 Cost Actual         7,000         9,200        84,000        83,000        93,000      112,000
A001 Profit Actual         3,000        30,800      (14,000)        17,000        37,000        48,000

 

Correct answer should be as follows:

Customer Metrics Type 31/01/21 28/02/21 31/03/21 30/04/21 31/05/21 30/06/21
A001 Sales Cummulative       10,000        50,000      120,000      220,000      350,000      510,000
A001 Cost Cummulative         7,000        16,200      100,200      183,200      276,200      388,200
A001 Profit Cummulative         3,000        33,800        19,800        36,800        73,800

     121,800

 

Thank you, Tracy

Labels (2)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

HI 
Use this expression 

rangeSum( before(TOTAL sum(Data),0,RowNo(TOTAL)))

View solution in original post

1 Reply
lironbaram
Partner - Master III
Partner - Master III

HI 
Use this expression 

rangeSum( before(TOTAL sum(Data),0,RowNo(TOTAL)))