Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kjsullivan
Frequent Visitor

Count of certain instance in a column from a distinct value of another column

I am trying to find the percentage of companies that offer a certain product. A company can sell many different products or the same product multiple times. What I want is the count of companies that sell the Product Pie (or Product Pizza) divided by the total number of companies. I know that companies C1, C2, and C3 sell Pie, but there are 5 instances of C1, C2, and C3. I know how to get there are only 4 total companies with DISTINCTCOUNT(Table1[Company]), but then I don't know how to get that there are 3 companies that sell Pie. I don't want to count all insatnces of Pie, just 1 Pie per company. Same goes for Pizza, there are 3 instances of it, but only 2 companies sell it. 

 

Capture4.PNG

 

What I am ending up with for the percentage of companies that sell Pie is 4 instances of Pie being sold by 4 total companies which equals 100% even though I know my answer needs to be 75%. 

1 ACCEPTED SOLUTION
kjsullivan
Frequent Visitor
1 REPLY 1
kjsullivan
Frequent Visitor

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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