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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors