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

Open and Closure Quantities

Hello,

I have an Excel sheet which logs shipments of ice cream (OrderQuantity, OrderWeight) for each month, as well as inventory count for each ice cream at the end of each month (ClosureQuantity, ClosureWeight).

I need to create a table that will have, for each month, the sum of "OpenQuantity" and "OpenWeight" and the sum of "ClosureQuantity" and "ClosureWeight", where 'OpenQuantity' of month X is the 'ClosureQuantity' of month X-1.

How can I do that?

Enclosed is the Excel sheet

Thanks

1 Reply
Channa
Specialist III
Specialist III

try to go by orderdate

 

=Sum({$<orderdate={">=$(MonthStart(Max(orderdate)))<$(=Monthhend(Max(orderdate))"}>}OpenQuantity)

 

this will bring open Quantity for selected month if not selected any month,it will choose max(date)

 

=Sum({$<orderdate={">=$(MonthStart(addMonths(Max(orderdate),-1))<$(=Monthhend(addmonths(Max(orderdate),-1)"}>}ClosureQuantity)

 

Channa