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

Distinct Count based on attribute from related table

Hello,

 

I am working with Two tables.  First table is a Members table with Member# and Plan Name.  Second Table has Plan Name and Benefit Name.  Each member can have only one plan, but each plan can have many benefits.  However, some benefits are a part of multiple Plans.  I need a distinct count of members for each benefit.  Suggestions?

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Ashish_Mathur
Super User
Super User

Hi,

In the second table, in the Plan Name column, there should only be unique entries.  Create a relationship from the Plan Name column of Table1 to the Plan Name column of Table2.  To your visual, drag Benefit Name from Table2 and write this measure

Members = distinctcount('Table1'[Member#])

If this does not help, then share some data of both tables (in a forma that can be pasted in an MS Excel file) and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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