Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
Ben | No |
Andy | No |
Ben | Yes |
Ben | Yes |
Ben | No |
Ben | Yes |
and the result i want is divide based on the total name count.
Yes | No | |
Andy | 67% | 33% |
Ben | 60% | 40% |
Solved! Go to 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 ]))
File.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
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
@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 | 3 | 67% | 33% |
Ben | 5 | 60% | 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 ]))
File.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Welcome! Kudos appreciated (thumbs up)
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
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 %?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |