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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ashleigh1904
New Member

Help - new measure to count Number of 'Yes' or 'No' values in column

Help! I am new to Power BI and I need to work out how to create a measure to count all the number of 'Yes' or 'No' responses within a specific column of a table.....can anyone direct me for which formula I need?

 

Thanks in advance,

3 REPLIES 3
NotMyJob
Helper III
Helper III

Not so fast grasshopper!!  Maybe I blew something up, but this is what I get on this.

 

NotMyJob_0-1729039910248.png

 

Syk
Super User
Super User

There are a few ways you can do this depending on your use case! Here's an example of creating 2 measures for each yes and no. Plug in your table and column names and it should work for you.

number of yes = CALCULATE (
    COUNT ( 'Table'[ID] ),
    'Table'[yes/no column] = "Yes"
)

number of no = CALCULATE (
    COUNT ( 'Table'[ID] ),
    'Table'[yes/no column] = "No"
)

this worked a treat for me - I exactly needed YES and NO, so used your example as template and was very happy with the output - thank you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.