Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
qwertzuiop
Advocate III
Advocate III

Conditional Count

Hello dear Power BI-Community

Following problem to solve:


Let's assume this table
You can imagine this would be a satisfaction survey.

The participant can say "yes" i was happy, "no" i was not happy, or make no statement "not answered"

If not satisfied (Answer = no), the participant gives a reason why.

 

QuestionAnswerReason
AYes-
BNoBecause it was stressful
BNoBecause it was hot 
CNot answered-
DNot answered-

 

The goal is now to calculate the sum of all answered questions

Unfortunately, with this data structure, it is not possible to simply add up the number of "answers" with Yes and No -> Result would be 3, which is wrong

The correct number would be 2 (namely, questions A & B were answered (question B simply justified twice)

 

Any idea how to solve this?

Thank you very much for your contribution.

 

Cheers

qwertzuiop

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@qwertzuiop 

pls try this

Measure = CALCULATE(DISTINCTCOUNT('Table'[Question]),FILTER('Table','Table'[Answer] = "Yes" || 'Table'[Answer]="No"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@qwertzuiop 

pls try this

Measure = CALCULATE(DISTINCTCOUNT('Table'[Question]),FILTER('Table','Table'[Answer] = "Yes" || 'Table'[Answer]="No"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors