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: 
robinwiman
Creator
Creator

How to create an aggregated column that is subtracted from

So I have a table that is showing products on row.

The columns hold an item number, the current inventory and then I have an expression that forecast the sales for coming weeks.

I would like to have a table that subtracts the forecast per week from the current inventory. Like:

Item number
Current Inventory
2018W41
2018W42
2018W43
etc...
0000-0000-000100908070...
0000-0000-001100............
0000-0000-002100............
0000-0000-003100............

So during 2018W41, we're expected to sell 10 units and so the future inventory will be 90 and so forth.

right now I get a table that shows the current inventory for each week (same every time since we only have the current) and then display the forecast next to it. I can subtract the two, but it will just add an extra column. I have also tried to hide a column, but I have to aggregate all the "current inventory" to only be shown at the beginning.

i tried Rangesum and before but cant get it to work..

How can I:

1) Create a table that subtracts continuously from the "current inventory"-column?

2) How can I make it so that column "2018W42" will subtract from "2018W41" and so on?

0 Replies