Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear all,
I desperately need help.
I have two tables in my model in power BI, Table A and Table B.
Table B has unique values.The two tables already have a “one-to-many” relationship in the model.
How do you count the unique quantity of a type A that contains B?
Thank you so much
Solved! Go to Solution.
Hi @Yumikang , You can try below measure:
Unique Count = CALCULATE(DISTINCTCOUNT(SheetA[Key Field]),SheetB[Key Field]<>BLANK())
Download PBIX file with the example shown below
The tables are linked together by a relationship on a column, let's call it RelCol.
In a Table visual add RelCol from Table B, then add the column from Table A that you want the unique count of and choose the aggregation Count (Distinct).
In my example I want the distinct count of Column1
Regards
Phil
Proud to be a Super User!
Hi @Yumikang , You can try below measure:
Unique Count = CALCULATE(DISTINCTCOUNT(SheetA[Key Field]),SheetB[Key Field]<>BLANK())
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |