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

Substract the next value from above of this by group by in a chart

Hello,

I have the following table 

StoreDateItemInventory QtyDiff Diff Correct
02124/02/2021410856251   
02110/03/2021410856135-116 -116
02119/04/202141085622085 85
02117/05/2021410856350130 130
02116/06/2021410856186-164 -164
04024/02/2021410856542356  
04010/03/2021410856373-169 -169
04019/04/202141085660-313 -313
04020/04/2021410856385325 325
04006/05/202141085613-372 -372
04017/05/2021410856154141 141
04018/05/2021410856264110 110
04016/06/202141085633773 73
02124/02/2021456734156-181  
02110/03/2021456734265109 109
02119/04/2021456734452187 187
02117/05/202145673470-382 -382
02116/06/2021456734236166 166
04024/02/2021456734123-113  
04010/03/2021456734235112 112
04019/04/202145673490-145 -145
04020/04/2021456734423333 333
04006/05/202145673465-358 -358
04017/05/2021456734321256 256
04018/05/2021456734456135 135
04016/06/2021456734245-211 -211

 

I have the store , the date , the item and the inventory qty in a chart. In the column Diff i have the expression

SUM([Inventory Qty]) - ABOVE(TOTAL SUM( [Inventory Qty])) 

The result is not correct because substract all the values for all stores for all items one by one. 

The result i want to have is the Diff Correct that substract the values only by store , item.

How can i manage this in order to have the results of the column Diff Correct in a chart ?

Thank you in advanced.

  

0 Replies