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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
sjade
Regular Visitor

Using DISTINCTCOUNT to find distinct names in table

I have a table with the following setup:

 

Teamnameskillrating
databasejohn smithSQL server3
databasejohn smithDAX3
databasejimmy plankSQL Server2
engineeringsusie qETL2
engineeringsusie qSQL3
engineeringissac walkerETL1

 

There are about 50 skills per person. And there are a varying number of people on each team. I am trying to write a DAX measure to count the distinct amount of employees on each team. Any suggestions? 

2 ACCEPTED SOLUTIONS
Whitewater100
Solution Sage
Solution Sage

Hi:

If your table name = Team  then

 

DC Team =
var teamname = SELECTEDVALUE(Team[Team])
return
CALCULATE(DISTINCTCOUNT(Team[name]), FILTER(ALL(Team),
Team[team] = teamname))
 
Whitewater100_0-1648141296238.png

 

View solution in original post

Hi:

Yes:

Dist CT =
CALCULATE(
DISTINCTCOUNT(Team[name]),
FILTER(ALL(Team),Team[Team] = EARLIER(Team[Team])))
 
Whitewater100_0-1648146275854.png

 

View solution in original post

6 REPLIES 6
Whitewater100
Solution Sage
Solution Sage

Hi:

If your table name = Team  then

 

DC Team =
var teamname = SELECTEDVALUE(Team[Team])
return
CALCULATE(DISTINCTCOUNT(Team[name]), FILTER(ALL(Team),
Team[team] = teamname))
 
Whitewater100_0-1648141296238.png

 

This is what I am looking for. is there anyway to add this value to the source table as a column? 

Hi:

Yes:

Dist CT =
CALCULATE(
DISTINCTCOUNT(Team[name]),
FILTER(ALL(Team),Team[Team] = EARLIER(Team[Team])))
 
Whitewater100_0-1648146275854.png

 

Thank you so much! 

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Picture1.png

 

Employee count in each team: = 
DISTINCTCOUNT(Data[name])

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi Jihwan:

I'm sorry if I answered after you. I did not see any answer yet when I answered. Thank you..

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.