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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Distinct countx?

I have a dataset where I want to create two measures, one is the total count of employees and the other is the total count of employees who are on a particular assignment. I know would have to use the countx(filter()) functions to the latter, but I am not sure how to make the count distinct while using countx. How would this be accomplished?

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Total Employees = DISTINCTCOUNT ( Table[Employee] )

Total Employees (on Assignment X) =
CALCULATE (
    [Total Employees],
    FILTER ( Table, Table[Assignment] = "Assignment X" )
)

Hope this helps! Smiley Happy

View solution in original post

2 REPLIES 2
Sean
Community Champion
Community Champion

Total Employees = DISTINCTCOUNT ( Table[Employee] )

Total Employees (on Assignment X) =
CALCULATE (
    [Total Employees],
    FILTER ( Table, Table[Assignment] = "Assignment X" )
)

Hope this helps! Smiley Happy

Anonymous
Not applicable

Yup, thanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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