Forum Discussion
vanessafvg
7 years agoCommunity Champion
calculated column = count values? (sum if)
i need to created a calcualted column that counts the columns where the value is yes ie column1 column2 column3 column4 calculatedcolumn yes yes ...
- 7 years ago
Hi vanessafvg,
The solution provided by AndrejZitnay is on the Query editor however if you want to do it in DAX you should use the following formula:
Count of Yes = IF(Table2[1] = "yes";1;0) + IF(Table2[2] = "yes";1;0) + IF(Table2[3] = "yes";1;0) + IF(Table2[4] = "yes";1;0)
Some principal different syntax.
Regards,
MFelix
vanessafvg
7 years agoCommunity Champion
AndrejZitnay hi that is actually a good idea but a calculate column seems less complex if i can get the logic right
MFelix
7 years agoSuper User
Hi vanessafvg,
The solution provided by AndrejZitnay is on the Query editor however if you want to do it in DAX you should use the following formula:
Count of Yes = IF(Table2[1] = "yes";1;0) + IF(Table2[2] = "yes";1;0) + IF(Table2[3] = "yes";1;0) + IF(Table2[4] = "yes";1;0)
Some principal different syntax.
Regards,
MFelix
- vanessafvg7 years agoCommunity Champion
MFelix yep go it thanks