Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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())
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |