Forum Discussion
CoreyP
6 years agoSolution Sage
A seemingly complex task...
Hey all, I've got what might be a fun one for all you experts. Here's what I'm trying to do: If any of you have a background in warehouse management, you might get this right off the bat. I'm...
CoreyP
6 years agoSolution Sage
I created a "Pallet Ranking" by going into query editor, and sorting first by SKU, then LOT, then FIFO date, and adding an Index column.
Seems to work. So how would I create the running total measure? I tried the following but it did not work:
Cumulative Qty =
CALCULATE (
SUM( 'Inventory'[ONHAND_QTY] ),
FILTER (
ALL ( 'Inventory'[Pallet Rank] ),
'Inventory'[Pallet Rank] <= MAX ( ( 'Inventory'[Pallet Rank] ) )
)
)
kentyler
6 years agoSolution Sage
I think you want to store the current value before you do calculate
Cumulative Qty =
var cur_index = max('inventory'[Pallet rank])
CALCULATE (
SUM( 'Inventory'[ONHAND_QTY] ),
FILTER (
ALL ( 'Inventory'[Pallet Rank] ),
'Inventory'[Pallet Rank] <= cur_index )
)
)