Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I try to create a model for my logistics dept. There is logic behind:
1. I have initial stock [IS] amount and daily sales plan [SP], also as Desired Stock Amount [DS]
2. I place an [Order] with size [DS] - ([IS] - [SP]) = [DS] - [IS] + [SP]
3. When order arrives, I calculate [Fact Stock] = [IS] - [Fact Sales] + previous [Order].
To calculate next order, I have to use [Fact Stock] instead of [IS], but it depends on previous [Order] value.
Is it possible to calculate this model with measures?
I can do it in Excel with referencing prev. cells, but in DAX I cannot find a solution.
Solved! Go to Solution.
Hi Maxim,
Here is a dummy example of how this sort of calculation can be done.
The logic is to first calculate Cumulative Sales/Orders. The differences between daily Cumulative Orders are then daily Orders, and Stock Level = Initial Stock - Cumulative Sales + Cumulative Orders.
I followed this sequence of calculation through a series of measures:
Hopefully this can be adapted to your exact situation.
Notes:
Cheers,
Owen
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |