Forum Discussion

ppgandhi11's avatar
ppgandhi11
Helper V
7 years ago
Solved

DAX Formula help - conditional calculation

Hi, I have the first 2 columns, I want to computer the 3rd column based on the logic given in notes.   ServiceCount is not a column. It is a measure that I have calculated correctly based on some ca...
  • v-cherch-msft's avatar
    v-cherch-msft
    7 years ago

    Hi ppgandhi11

     

    You may refer to below measure:

    Measure  =
    IF (
        MAX ( Table[Service] ) = "D01"
            || MAX ( Table[Service] ) = "D02",
        [ServiceCount]
            / CALCULATE (
                [ServiceCount],
                ALL ( Table[Service] ),
                Table[Service] IN { "D01", "D02" }
            )
    )

     

    Regards,

    Cherie