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
arvindsingh802
7 years agoCommunity Champion
I think this will help
ServiceLevelCompare = DIVIDE(ServiceData[ServiceCount],IF(ServiceData[Service] = "D01" || ServiceData[Service] = "D02",
CALCULATE(SUM(ServiceData[ServiceCount]),FILTER(ALL(ServiceData),ServiceData[Service]="D01"||ServiceData[Service]="D02")),
IF(ServiceData[Service] = "D04" || ServiceData[Service] = "D05",
CALCULATE(SUM(ServiceData[ServiceCount]),FILTER(ALL(ServiceData),ServiceData[Service]="D04"||ServiceData[Service]="D05")), 1)),0)
Regards,
Arvind