Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculated Columns and Measure

Hi,   I'm trying to create a measure that looks at columns Journey Alias and Stop Comp over 5 mins and returns either Compliant or Not Compliant for a specific Journey Alias.   Eg. 101191351 shou...
  • v-luwang-msft's avatar
    5 years ago

    Hi Anonymous ,

    You could  try the following measure:

    test =
    VAR not_compliant =
        CALCULATE (
            COUNT ( 'Table'[Stop Comp over 5 mins] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Journey Alias] = MAX ( 'Table'[Journey Alias] )
                    && 'Table'[Stop Comp over 5 mins] = "Not Compliant"
            )
        )
    VAR at_all =
        IF ( not_compliant >= 1"Not Compliant""Compliant" )
    RETURN
        at_all

     

     

    Finally you will see:

     

     

    If this is not what you want, please describe what you want, thank you!

     

     

    Best Regards,

    Lucien