Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
i need to created a calcualted column that counts the columns where the value is yes
ie
column1 column2 column3 column4 calculatedcolumn
yes yes yes 3
what would be the best way to create this?
Proud to be a Super User!
Solved! Go to Solution.
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHello @vanessafvg
I would maybe to some measurment but if you want that in colum than :
step 1
add 4 conditional columns and if operator equal yes than 1 otherwise 0
step 2
add all 4 conditional columns together.
@AndrejZitnay hi that is actually a good idea but a calculate column seems less complex if i can get the logic right
Proud to be a Super 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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix yep go it thanks
Proud to be a Super User!
Hi @vanessafvg and @AndrejZitnay,
Although the option from @AndrejZitnay is correct you can make it just with one column:
(if [1] = "Yes" then 1 else 0) + (if [2] = "Yes" then 1 else 0) + (if [3] = "Yes" then 1 else 0) + (if [4] = "Yes" then 1 else 0)
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHello @vanessafvg
I would maybe to some measurment but if you want that in colum than :
step 1
add 4 conditional columns and if operator equal yes than 1 otherwise 0
step 2
add all 4 conditional columns together.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
37 |