Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have been struggling to create a measure for calculation for Future stock coverage days.Below is a example of Matrix visual in Power BI.
Measure already created for Opening Stock,Demand , Receipts & Closing Stock .
Opening stock =
Constraints as below
I want to use a measure to calculate the stock cover days based on future demand
Kindly help in creating a measure for Stock cover Days .
Example - Stock cover days for week 2021.06 = 14 ( closing stock = 20 , Demand =20 happens next 2 weeks hence 14)
| Year /week | 2021.06 | 2021.07 | 2021.08 | 2021.09 | 2021.1 | 2021.11 | 2021.12 | 2021.13 | 2021.14 |
| Material | |||||||||
| Material A | |||||||||
| Opening Stock | 20 | 20 | 20 | 20 | 20 | 20 | 20 | 20 | |
| Demand | 40 | 0 | 20 | 30 | 0 | 10 | 40 | 0 | 30 |
| Receipts | 20 | 20 | 20 | 20 | |||||
| Closing Stock | 20 | 40 | 20 | 10 | 30 | 40 | 0 | 0 | -30 |
| Stock Cover Days | 14.0 | 11.7 | 4.7 | 14.0 | 10.5 |
Kindly respond Let me know if anything else is required.
Regards
Joshi M
@amitchandak Many Thanks for the Links.
I think the belw link will work
https://community.powerbi.com/t5/Desktop/Days-of-supply/td-p/635223
However Not sure how to apply in my example.
kindly check my example and let me Know
Regards
Manish
@Joshi_M , refer if the similar solution of the blog can help
https://community.powerbi.com/t5/Desktop/Number-of-Days-stock-on-hand/m-p/466896
https://community.powerbi.com/t5/Desktop/Days-of-supply/td-p/635223
https://radacad.com/calculating-stock-on-hand-using-dax-power-bi-inventory-model
https://www.pbiusergroup.com/communities/community-home/digestviewer
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |