Forum Discussion

cprpontes's avatar
cprpontes
Regular Visitor
5 years ago
Solved

Automate operator for each change in root table

I have two separate tables, where 1 has the failures and the times that happened each one of them, the other table is the names of the operators that test a product where failures happen for each ope...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi cprpontes ,

     

    Please try the following to see if the problem above still occurs.

    Calculate the maximum time and minimum time.

     

    Max Time =
    CALCULATE (
        MAX ( 'operators'[HR I/F] ),
        FILTER (
            'operators',
            'operators'[OPERADOR] = EARLIER ( 'operators'[OPERADOR] )
                && 'operators'[ESTAÇÃO] = EARLIER ( 'operators'[ESTAÇÃO] )
        )
    )

     

    Min Time =
    CALCULATE (
        MIN ( 'operators'[HR I/F] ),
        FILTER (
            'operators',
            'operators'[OPERADOR] = EARLIER ( 'operators'[OPERADOR] )
                && 'operators'[ESTAÇÃO] = EARLIER ( 'operators'[ESTAÇÃO] )
        )
    )

     

    Then:

    REV OPER =
    CALCULATE (
        MAX ( 'operators'[OPERADOR] ),
        FILTER (
            'operators',
            'operators'[Min Time] < EARLIER ( 'Failures'[HR I/F] )
                && 'operators'[Max Time] > EARLIER ( 'Failures'[HR I/F] )
                && 'operators'[ESTAÇÃO] = EARLIER ( 'Failures'[ESTAÇÃO] )
        )
    )

     

    A sample PBIX. for your reference is attached.

    Hope it helps,


    Community Support Team _ Caitlyn Yan


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