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
jmscrx
Helper I
Helper I

% of unique values in a column based on the value of another column?

Hi folks, new to the community and PowerBI. I've been able to solve most of my basic issues so far via searching here and trial and error, thanks for all your contributions to this community. It's amazing how well versed everyone is with such a powerful tool.

 

Anyway, my data is similar to the below.

 

Vendor NameNeeds Remediation
Vendor1Yes
Vendor1Yes
Vendor2No
Vendor2No
Vendor2No
Vendor2No
Vendor3No
Vendor3Yes
Vendor3Yes
Vendor3Yes
Vendor3Yes
Vendor3No

 

What I'd like to do with a visual is to calculate/display the "percentage of vendors with findings that need remediation." I'm not sure if this would be a measure, calculated column or similar and the likely needed DAX is a bit over my head at this early stage. So with the above data my outcome would simply be a percentage that considered Vendor1 and Vendor2 (2 total unique vendors) as a percentage of all unique vendors (3 total in this case). Said differently, I want to calculate the percentage of unique vendors with a Yes in column 2 based on the number of overall unique vendors from column 1. 

 

In this case it would be 2 unique vendors calculated as a percentage of 3 total. I hope I'm explaining this correctly and feel like I'm over thinking it :). Thanks!

 

1 ACCEPTED SOLUTION

Thanks for the quick reply, this makes sense and seems to work when used in a card visual!!!

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

You probably want a measure similar to this:

NeedsRemediation% =
DIVIDE (
    CALCULATE (
        DISTINCTCOUNT ( Table1[Vendor Name] ),
        Table1[Needs Remediation] = "Yes"
    ),
    DISTINCTCOUNT ( Table1[Vendor Name] )
)

Thanks for the quick reply, this makes sense and seems to work when used in a card visual!!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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