The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all
I am trying to achieve a logic using DAX.
Logic
Till current date I need to show the stock that is actually available in the Inventory. For future days, it should show based on the logic (Previousday stock -Last 3months sales average) as projection
Measures
1.last 3 months sales avg =
2.Stock on hand =
var previousdaystock =
For example ,
Max stockdate (in data )=12/5/2022
last 3 month sales avg
For Dec 2022,it is 40 ( Last 3 month sales avg differs from month to month )
Projection for product A
eg. 12/6/2022 = previousday stock -daily sales => 990 - 40 =950
12/7/2022 = 950-40 = 910
12/8/2022 =910-40 = 870
12/9/2022 =870-40 = 830 and it goes on....
| actual | actual | Proj | Proj | Proj | Proj | Proj | Proj | Proj |
Product | 12/4/2022 | 12/5/2022 | 12/6/2022 | 12/7/2022 | 12/8/2022 | 12/9/2922 | 12/10/2022 | 12/11/2022 | 12/12/2022 |
A | 1000 | 990 | 950 | 910 | 870 | 830 | 790 | 750 | 710 |
B | 800 | 750 | 710 | 670 | 630 | 590 | 550 | 510 | 470 |
C | 400 | 350 | 310 | 270 | 230 | 190 | 150 | 110 | 70 |
Please let me know if you have any idea on how to achieve the above result using dax.
Need help in achieving the above requirement
@PowerBIShan , Check if these can help
Stock Day =
https://radacad.com/calculating-stock-on-hand-using-dax-power-bi-inventory-model
https://blog.enterprisedna.co/calculate-days-of-zero-stock-power-bi-inventory-management-insights/
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
18 | |
18 | |
17 | |
15 | |
13 |
User | Count |
---|---|
36 | |
35 | |
19 | |
18 | |
18 |