Forum Discussion

MrKwanorama's avatar
MrKwanorama
Icon for Microsoft Employee rankMicrosoft Employee
4 years ago
Solved

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 consolid...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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)

     

    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.