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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Regular Visitor

Stock Cover Calculation

Hello PBI users,


I want to calculate "Stock cover" KPI. It will rerturn number of days or weeks, for how long current stock ammount leasts When consumption in future weeks is known. Starting from the current plant stock (or selected week = starting point), the requirements are deducted one after the other along the time axis. This is done until there is a shortage (requirement > stock). The range of coverage is then the number of weeks between starting week  and the week number of the requirement that causes the shortage minus one week. The value after the decimal point is the ratio between the opening stock on the week of the shortage and the requirement on the week of the shortage.




Stock 1st week (selected week) = 240 pcs

1st week (selected week) : Requirement for 90 pcs => Stock = 150 pcs. (240 - 90)

2nd week (selected week + 1): Requirement for 70 pcs => Stock = 80 pcs (240 - 90 - 70)

3rd week (selected week +2): Requirement for 100 pcs => Shortage (240 - 90 - 70 - 100)

Range of coverage = 3 weeks - 1 + 80/100

= 2 + 0,8

= 2,8 weeks = Stock ammount in selected week least for 2.8 weeks


Thank you!

Community Support
Community Support


Please see How to Get Your Question Answered Quickly


Best Regards


Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors