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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KK111
Frequent Visitor

Counting number of "Y" in a column that only contains Y and N values

Hello,

I am new to Power BI and need some help please. I have a column that contains data below. I want to create a table that will include only values for "y".

 

KK111_0-1643310151925.png

When I pull Column A  into the Value field it counts both Y and N. How can I make it count only Y? Thank you. 

KK111_2-1643310394033.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @KK111 ,

You can apply a visual-level filter on your visual: select the visual and apply the filter condition (Column A is "Y") in Filters pane just as suggested by @lbendlin . Please find more details about adding a filter to a report in the following documentation.

Add a filter to a report in Power BI

yingyinr_0-1643781493274.png

Besides that, you can create a slicer using the field Column A and create a measure as below to get the count of Column A which the value is "Y". Please find the details in the attachment.

Count of Y = CALCULATE(COUNT('Table'[Column A]),'Table'[Column A]=SELECTEDVALUE('Table'[Column A]))

yingyinr_3-1643781994799.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @KK111 ,

You can apply a visual-level filter on your visual: select the visual and apply the filter condition (Column A is "Y") in Filters pane just as suggested by @lbendlin . Please find more details about adding a filter to a report in the following documentation.

Add a filter to a report in Power BI

yingyinr_0-1643781493274.png

Besides that, you can create a slicer using the field Column A and create a measure as below to get the count of Column A which the value is "Y". Please find the details in the attachment.

Count of Y = CALCULATE(COUNT('Table'[Column A]),'Table'[Column A]=SELECTEDVALUE('Table'[Column A]))

yingyinr_3-1643781994799.png

Best Regards

lbendlin
Super User
Super User

Look in the Filter Pane, "Filters on this Visual", find Column A, set its filter to "Y".

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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