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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors