Forum Discussion
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
- Ashish_MathurSuper 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.
- AnonymousNot 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