Forum Discussion
ppgandhi11
7 years agoHelper V
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...
- 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
v-cherch-msft
7 years agoMicrosoft Employee
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
ppgandhi11
7 years agoHelper V
Cherie,
Thanks a lot. Your solution works. This is exactly what I was looking for. Thanks again!
Prashant-