The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
we have a PowerBi report in which the future stock per material per calendar week is forecasted. Now we want to add a value to this report and if the value 0 is forecast in a calendar week, we want to calculate +1 for each previous calendar week. So that the calendar week 2 weeks before 0 has the value 2 and so on.
You can see in the picture that in line 3 on 28.08 the stock goes to 0. Now in the new measure there should be a 1 in the week of 21.08. and a 2 in the week of 14.08....
Thanks for every help
@Lukas21 , refer if these approach can help
Inventory Days
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/
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.