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
Xeth
Frequent Visitor

Need help on getting distinct-count of employees based on filter conditions on utilization

I am a newbie to power-bi and in the process of getting a grasp on dax.

Currently, I have a datamodel covering projects, sub-projects, employees, employee-allocation.
Employee-allocation includes plan, actual in days for each employee on a monthly basis.

Relationships: Project 1:N Sub-projects, Sub-projects 1:N Employee-allocation and Employees 1:N Employee-allocation

Preparing a dashboard at sub-project level...
Keeping the filter contexts, need help on getting distinct-count of employees based on filter conditions on utilization (actual / plan).

* No. of employees with plan=0 and actual>0
* No. of employees with actual > plan
and such


1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Xeth , Assume you have two measure actual and plan  new measures you need

M1=

Countx(values(Employee[Employee]), if( (Isblank([Plan]) || [Plan] = 0) &&[Actual] >0, [Employee], blank())  )

 

M2=

Countx(values(Employee[Employee]), if( [Actual] >[Plan], [Employee], blank())  )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Xeth , Assume you have two measure actual and plan  new measures you need

M1=

Countx(values(Employee[Employee]), if( (Isblank([Plan]) || [Plan] = 0) &&[Actual] >0, [Employee], blank())  )

 

M2=

Countx(values(Employee[Employee]), if( [Actual] >[Plan], [Employee], blank())  )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandakThank you.
A simple solution instead of the complex methods I was trying to apply.

Helpful resources

Announcements
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!

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.

Top Solution Authors