Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Production Yield Calculation

Hello all, I am working on creating a production yield dashboard. Dummy format of how my data looks is attached below. I wanted to calculate yield of each operation individually. As you can see, a p...
  • Icey's avatar
    4 years ago

    Hi Anonymous ,

     

    Please check:

    Measure =
    VAR Count_UnitID =
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Unit ID] ),
            FILTER (
                ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
                'Table'[Status] = "pass"
            )
        )
    VAR Count_ALL =
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Unit ID] ),
            ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
        )
    RETURN
        DIVIDE ( Count_UnitID, Count_ALL )
    

     

     

    Column =
    VAR Count_UnitID =
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Unit ID] ),
            FILTER (
                ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
                'Table'[Status] = "pass"
            )
        )
    VAR Count_ALL =
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Unit ID] ),
            ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
        )
    RETURN
        DIVIDE ( Count_UnitID, Count_ALL )
    

     

     

    Best Regards,

    Icey

     

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