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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Days of Supply

Hi I have the data in the following format and I want to calculate a measure for future days of supply based on the sales demand of future months. Basically I want to see for how many days the closing stock at end of each month is enough to cover the future sales (at different hierarchical levels -product/brand/market etc)
I m at a total loss at how to create a measure which could be achieve this. 

 

Some info about the data:

The closing stocks and sales information is in the same column. 

There are different markets and products and brands.

The value and volume data is in the same column as well.

date (mm-YYYY)CycleMarketProd CodeData TypeAmountCategoryMonthYearQuarterBrand Name
12-2019Mar'20Australia10201Sales142Volume122019Q4XYZ
12-2019Mar'20China 1035235Sales14889Value122019Q4ABC
01-2020Mar'20Turkey1052348Sales87Volume012020Q1MMM
12-2019Mar'20Turkey1062345Stock87Value122019Q4XXX

 

I found a related query on another forum however, that solution is not working for my data type.


Please please please help me on this! the progress of my whole project is stuck because of this 😞

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

I actually wrote a Days of Supply quick measure once and a better/improved version is in my book.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Days-of-Supply/m-p/635656?search-action-id=1...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Greg,

 

Thank you for your response. 

I actually did earlier try the formula in the link that you have provided. But it isn't working for me. I tried editing it as per my data but I get blank results. 

Anonymous
Not applicable

hi @Greg_Deckler ,

can you kindly look at the sample data: sample data 

 

I tried the formula again and I m getting the supply cover for one location only. For other one I m getting blanks. 

 

Also, another problem is that i have  monthly ending stocks.

So for instance, the following would mean that 394k is the ending stock so I should not be taking into account the sales data of that month to calculate the cover. I need to start calculating the cover from Feb'20 onwards. Any idea how to tweak the formula for that?

MarketMonth-yearGMMSales dataStock
Location 101-2020Prod A274963394351.4

 

And since I have week numbers based on the year, at the end of the year I get a blank for days cover.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.