Forum Discussion

rdsuser's avatar
rdsuser
New Member
2 years ago
Solved

Help needed: calculate the average loss caused by a specific type of outages

Hi everyone - as i'm very new to power BI I'd like to ask a potentially simple question.   I'm tryting to calculate the average loss caused by a specific type of outages in a production environment...
  • DataInsights's avatar
    2 years ago

    rdsuser,

     

    Try this measure. It groups by Outage Type and Production Line, and then computes the average. You can use MIN or MAX to get Weekly schedule time by Production Line since it's the same value for each combination of Outage type and Production Line.

     

    Average Loss = 
    AVERAGEX (
        SUMMARIZE ( 'Table', 'Table'[Outage type], 'Table'[Production Line] ),
        DIVIDE (
            CALCULATE ( SUM ( 'Table'[Outage loss(min)] ) ),
            CALCULATE ( MAX ( 'Table'[Weekly schedule time by Production Line] ) )
        )
    )

     

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi rdsuser 

     

    In addition to the DataInsights's method, allow me to add my method below:

    Average Loss = 
    AVERAGEX (
        VALUES ( 'Table'[Outage type] ),
        AVERAGEX (
            VALUES ( 'Table'[Production Line] ),
            DIVIDE (
                CALCULATE ( SUM ( 'Table'[Outage loss(min)] ) ),
                CALCULATE ( MAX ( 'Table'[Weekly schedule time by Production Line] ) )
            )
        )
    )

     

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