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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MrKwanorama
Employee
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
Employee
Employee

MrKwanorama_0-1646404702398.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.