Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello all.
I have a table below,
Unique ID Team
1 A
1 A
2 A
2 B
3 A
3 C
4 A
How can I build a expression so that I can count the number of Team by Unique ID? I.e., For Unique ID 2, there will be 2 counts, Unique ID 1 will have 1 count because there is only one "A"
Thanks in advance!
Solved! Go to Solution.
Hi,
You have gotten some good ideas. Actually, you can get this without a measure if you want a table visual. Drag Team and Unique ID to values. Make sure Unique ID is “Don’t summarize” and Team is “Count(Distinct)”. The formula by @Anonymous works.
Best Regards!
Dale
@JS Team_CT = COUNTA(Table1[Team])
Then when you use it, if the Unique ID is an int you would just make sure it wasn't summed, or make it a text field so the id isn't aggregated as well.
Hello. Thanks for your response.
I have tried the above mentioned DAX, it isn't working... I still get count of 2 for Unique ID 1.
What about:
DISTINCTCOUNT(Table1[Team])
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 21 | |
| 19 |
| User | Count |
|---|---|
| 44 | |
| 32 | |
| 18 | |
| 17 | |
| 17 |