Forum Discussion

Nph's avatar
Nph
Frequent Visitor
2 years ago
Solved

Line Item Calculation at Header Level / OTIF Score Rolled up

Hello,  I am looking for help with a measure I am trying to solve in Power BI, basic Excel example below of the desired result (yellow).  Dataset example in blue.  The goal is to be able to vi...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, Nph 

    Thank you very much for your reply. What you mean is that if only one of the OTIF Score at Line Item Level corresponding to the current Order number is 0, then the OTIF Score at Order Header Level of the Order number is 0. Take the data you provided, if one of the 1234 is 0, then the OTIF Score at Order Header Level corresponding to 1234 is 0?

    You can try the following DAX expressions:

    MEASURE =
    VAR _seleted =
        SELECTEDVALUE ( 'Table'[Order Number] )
    VAR _table =
        SUMMARIZE (
            FILTER ( ALL ( 'Table' ), 'Table'[OTIF Score at Line Item Level] = 0 ),
            'Table'[Order Number]
        )
    RETURN
        IF ( _seleted IN _table, 0, 1 )
    

    Here are the results:

     

     

     

    How to Get Your Question Answered Quickly

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Jianpeng Li

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