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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chris886
Frequent Visitor

Distinct count based on second table

Newbie here.  I'm trying to figure out how to count the distinct number of people that have taken a training. I have two tables that would appear like below. Some people have been around a long time and taken the same training more than once. 

 

I need help figuring out "Distinct number of people who have taken training". For the data below I'd be looking for a return of three.

 

NameTraining Course
ChrisTraining #1
ChrisTraining #1
ChrisTraining #1
Brad 
JohnTraining #1
JohnTraining #1
Tony 
Sam

Training #1

 

Has to be done in DAX as I don't have access to the dataset/power query.

 

Thank you.

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@chris886 

I guess you are using live connection mode so you can only create a measure for this. 

 

Measure = CALCULATE(DISTINCTCOUNT('Table'[Name]),FILTER('Table',[Training Course]<>BLANK()))
Vpazhenmsft_0-1628472402909.png

 

Paul Zheng _ Community SZhengt Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@chris886 

I guess you are using live connection mode so you can only create a measure for this. 

 

Measure = CALCULATE(DISTINCTCOUNT('Table'[Name]),FILTER('Table',[Training Course]<>BLANK()))
Vpazhenmsft_0-1628472402909.png

 

Paul Zheng _ Community SZhengt Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.