Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vitalities
Frequent Visitor

Number of Days stock on hand

Hello everyone,

 

i have the following data set at SKU-location level: 1)period  2)stock quantities in cases 3) 8 columns of weekly forecast in CS (week 0 to week 7).

 

Based on that, i need to calculate days on hand / weeks on hand at each period at any selected level of product hierarchy (SKU or higher level) and any aggregation of storage locations

 

Please help me with the ideas on how it  can be delivered. Thanks a lot in advance

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@vitalities,

Please check if DAX in the attached PBIX file returns your expected result. 

Regards,
Lydia

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@vitalities,

Please check if DAX in the attached PBIX file returns your expected result. 

Regards,
Lydia

Anonymous
Not applicable

@vitalities,

Please follow the instructions in the thread below to provide sample data of your table here and post expected result.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Regards,
Lydia

Days on hand should be calculated based onstock and forecast , in case stock is more than 8 weeks of forecast, it should be considered as 57Days on hand should be calculated based onstock and forecast , in case stock is more than 8 weeks of forecast, it should be considered as 57

 

 

Here it is. Stock and forecast are in same units. I need a measure to calculate how many days of forecast will be covered with stock we have

Expected resultExpected result

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.