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
Anonymous
Not applicable

calculate percentange of yes and no based on their names , hoping a quick measure could help.

Hi, 

i'd like to get percentage of yes and no based on their names , here is the data :

Name Attendance 
Andy Yes
Andy Yes
BenNo
Andy No
BenYes
BenYes
BenNo
BenYes

 

and the result i want is divide based on the total name count. 

 YesNo
Andy 67%33%
Ben60%40%
1 ACCEPTED SOLUTION

Hi there,

Yes = CALCULATE(COUNTROWS('Table');'Table'[Attendance ]="Yes")/
CALCULATE(COUNTROWS('Table');ALL('Table'[Attendance ]))
No = CALCULATE(COUNTROWS('Table');'Table'[Attendance ]="No")/
CALCULATE(COUNTROWS('Table');ALL('Table'[Attendance ]))

yesno.png

File.

 

Kind regards, Steve. 

View solution in original post

6 REPLIES 6
AlB
Community Champion
Community Champion

Hi @Anonymous 

1. Place Name in the rows of a matrix visual

2. Place Attendance  in the columns the matrix visual

3. Place Attendance  in Values of the matrix visual. Choose Count and Show value as--> Percent of row total

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Anonymous
Not applicable

@AlB , sorry. i'm actually looking for a method or quick measure for me to get the following answer .

 

 Total Count

% Yes

( # of Yes / total count)

% No

( # of No  / total count)

Andy 367%33%
Ben 560%40%

 

Do you know any formula for me to get that? thanks again.

Hi there,

Yes = CALCULATE(COUNTROWS('Table');'Table'[Attendance ]="Yes")/
CALCULATE(COUNTROWS('Table');ALL('Table'[Attendance ]))
No = CALCULATE(COUNTROWS('Table');'Table'[Attendance ]="No")/
CALCULATE(COUNTROWS('Table');ALL('Table'[Attendance ]))

yesno.png

File.

 

Kind regards, Steve. 

Anonymous
Not applicable

Awesome! thanks @stevedep ! 🙂 

Anonymous
Not applicable

Thanks AIB.

I want to use it for stacked column chart which allow to show Andy and Ben yes and no %. how do i do so? 

is there any quick measure formula allow me to find name "Andy" and count yes or no %? 

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.