Forum Discussion

Ch3ris's avatar
Ch3ris
Regular Visitor
3 years ago

POWER BI [Calculation % on time performance] Metrics

Hi All,

 

Can anyone help me on how to calculate % on time percentage based on early , late , on time accuracy  on creating new measure / power query etc? Thanks 

 

For example  

 

Order No  -1234 

Accuracy - On time

Box Quantity - 1

 

 

Thanks

Chris 

5 Replies

    • Ch3ris's avatar
      Ch3ris
      Regular Visitor

      Hi ,

       

      I wish to use it to calculate sales order delivery performance whether is meet on time, late, early

       

      For example :  Suppose to deliver to customer on 31/10/2022 , but got delivered to customer on 30/10/2022 which is early

       

      So for me currently, i have data that is Customer Delivery Accruacy - On Time, Late , Early

      Box quantity , sales order number count

      but i want to calculate them in separate for those on time order %, late order % , and early order % 

       

      Sales Order Number Customer Expectation Delivery Date Delivery Accuracy Box Quantity
      1234                                    03/08/2022 00:00:00                          Early                      1 



      • Dinesh_Suranga's avatar
        Dinesh_Suranga
        Icon for Continued Contributor rankContinued Contributor

        Ch3ris ,

        Hi,

        1 Add "Delivery Accuracy" column to a table.

         

        2 Create a mesure using following DAX formula (Change table name and column name as your data model).

        % = 

        // Get all Customer Delivery Accruacy

        VAR TotalCount =  CALCULATE(COUNT('Table'[Delivery Accuracy]),  ALL('Table'[Delivery Accuracy]))

        // Get Customer Delivery Accruacy for each type

        VAR RelatedCount = CALCULATE(COUNT('Table'[Delivery Accuracy]),  'Table'[Delivery Accuracy] = SELECTEDVALUE('Table'[Delivery Accuracy]))

        RETURN

        Divide(RelatedCount,TotalCount)

        3 Add % mesure to your table.

         

        If you have any question regarding this solution please reply to this message.

        Please acept this as solution if it helped you to solve the issue.

        Thank you.