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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
MrKwanorama
Microsoft Employee
Microsoft Employee

Supply chain measure - In Stock Percentage

For demand planning, I am looking to create an overview of a company in-stock-percentage or ISP.

Challenge is, that I have the same partnumbers on multiple locations and need the ISP as one consolidated percentage of Category regardless of location.

  • How do I create a measure to return the percentage of Category holding Inventory of Partnumber in any Plant?
  • For reference, Drillsystem ISP in below table is 75% since 6 of 8 partnumbers are in stock in any given Plant

 

CountryCategoryPartnumberPlantInventory
ESDrillsystempart1warehouse12
ESDrillsystempart1warehouse20
ESDrillsystempart2warehouse10
ESDrillsystempart2warehouse25
ESDrillsystempart3warehouse10
ESDrillsystempart3warehouse20
ESDrillsystempart4warehouse10
ESDrillsystempart4warehouse24
ESDrillsystempart5warehouse15
ESDrillsystempart5warehouse22
ESDrillsystempart6warehouse10
ESDrillsystempart6warehouse20
ESDrillsystempart7warehouse15
ESDrillsystempart7warehouse22
ESDrillsystempart8warehouse10
ESDrillsystempart8warehouse25
     

 

 

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @MrKwanorama ,

 

According to my understanding, you want to calculate the ratio of distinct PartNumber when Inventory<>0 of each Country and each Category, right?

If so , please try:

Drillsysytem ISP = 
var _partNo= CALCULATE(DISTINCTCOUNT('Table'[Partnumber]), ALLEXCEPT('Table','Table'[Country],'Table'[Category]))
var _inveNo= CALCULATE(DISTINCTCOUNT('Table'[Partnumber]),FILTER(ALL('Table'),[Country]=MAX('Table'[Country]) && [Category]=MAX('Table'[Category]) && [Inventory]<>0))
return DIVIDE(_inveNo,_partNo)

Eyelyn9_0-1646718753782.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @MrKwanorama ,

 

According to my understanding, you want to calculate the ratio of distinct PartNumber when Inventory<>0 of each Country and each Category, right?

If so , please try:

Drillsysytem ISP = 
var _partNo= CALCULATE(DISTINCTCOUNT('Table'[Partnumber]), ALLEXCEPT('Table','Table'[Country],'Table'[Category]))
var _inveNo= CALCULATE(DISTINCTCOUNT('Table'[Partnumber]),FILTER(ALL('Table'),[Country]=MAX('Table'[Country]) && [Category]=MAX('Table'[Category]) && [Inventory]<>0))
return DIVIDE(_inveNo,_partNo)

Eyelyn9_0-1646718753782.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Oh - was too fast there. What I need is to calculate the ratio of instock for the category. E.g. if we have inventory on 7 of 10 partnumbers in any plant, the ISP is 70% for the category.

Perfect - thank you so much

MrKwanorama
Microsoft Employee
Microsoft Employee

MrKwanorama_0-1646404702398.png

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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