Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JS
Helper II
Helper II

DAX help

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! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

What about:

DISTINCTCOUNT(Table1[Team]) 

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

@JS

 

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.DAX help.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@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. 

Anonymous
Not applicable

What about:

DISTINCTCOUNT(Table1[Team]) 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.