Forum Discussion
Track Stock amount
- 2 years ago
Hi JoRose I created two measure, based on your sample data, as following
Adjust your proper fact / Calendar tables names and you should get output from Output (Date from Date table, not fact)
1. Simple simple = SUM(factInventory[Quantity])
2. Sum adjusted =IF (ISEMPTY ( factInventory ),CALCULATE ( [Simple simple] ,OFFSET ( -1,, ORDERBY ( 'Date'[Date] ), ) ),[Simple simple])Output
Hi JoRose I created two measure, based on your sample data, as following
Adjust your proper fact / Calendar tables names and you should get output from Output (Date from Date table, not fact)
1. Simple simple = SUM(factInventory[Quantity])
Output
- JoRose2 years agoFrequent Visitor
Track Stock amount
Helo some_bih, thank you so much for your effort. In my simple example scenario it works perfectly.
Anyway i still have issues with your solution. It only works when the offset between changes in stock amount are no more then 1 day. To show what i mean, i have slightly adjusted the sample data.
Fact table:
Example visual:
As you can see, there doesnt seem to be any stock for 220 at the 08. of december, but there are actually still 3 pieces 06. december.
And finally one more point: I couldnt find a way to sum up the result of the measure 'sum adjusted'.
But in the end i need a visual which only shows one bar per day, whichs means ill have to sum up over all products on that day.
I hope you can help me out on that. If there are remaining questions reach out.
with kind regards.