Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have 2 columns - column1 contains unique labels, column2 contains a value (1 or 0 that represents yes/no). I want to sum the values in column2 and divide by the number of occurrences of the unique label over any rows so I can return a % of Y vs. N.
| Ecru Uph | 1 |
| Ecru Uph | 1 |
| Leesport Uph | 1 |
| Arcadia Uph | 1 |
| Arcadia Uph | 1 |
| Arcadia Uph | 1 |
| Arcadia Uph | 0 |
Thank you.
Solved! Go to Solution.
CountAll = COUNTROWS('YourTable')
CountYes = CALCULATE(
[CountAll],
'YourTable'[Column2] = 1
)
Yes Percent = DIVIDE(
[CountYes],
[CountAll]
)
I've split this up into 3 measures so you can call those measures later on, for example if your wanted a No percent.
CountAll = COUNTROWS('YourTable')
CountYes = CALCULATE(
[CountAll],
'YourTable'[Column2] = 1
)
Yes Percent = DIVIDE(
[CountYes],
[CountAll]
)
I've split this up into 3 measures so you can call those measures later on, for example if your wanted a No percent.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!