Forum Discussion
sprakash1192
6 years agoHelper II
Calculate Inventory Roll Forward to future dates
I have calculated inventory for every date based on transactions for inventory items. I want to roll forward the ending inventory to future dates in the calendar. For example, if I an ending balance ...
lbendlin
6 years agoSuper User
Here's my version:
yes, as others have mentioned use a dates table , mark it, and link it appropriately. ALSO you need to use the date from the dates table as your first column in the visual, filter the visual or page with the appropriate date range, and enable "show items with no data"
Your measure can be defined such (pseuo code):
tq =
var d= SELECTEDVALUE(Dates[date])
var t=CALCULATE(max(Inventory[Date]),filter(all(Dates),Dates[date]<=d))
return CALCULATE(sum(Inventory[Value]),filter(all(Inventory),Inventory[Date]=t))That will propagate the inventory value forward through any gap days, and pick the actual values again if available.