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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Employee Count - based on Slicer Selection

Good Morning,

I have an interesting problem to solve - 

KPI is Count of Active Employees 

Slicers are Year, Quarter, Month

Data has employee id along with employee start date and employee end date.  

KPI needs to reflect the active employee count based on what the user selects in any of the slicers.  

 

If the user selects Year 2022 and Qtr Q1, and an employee leaves in Feb, the employee should be counted because employee was active in Q1.

 

I tried the following - but thats not the full solution -
Active Employee Count = Calculate(DISTINCTCOUNTNOBLANK('Emp-Data'[RACFID]),
            'Emp-Data'[start_date] <= Today(), 'Emp-Data'[end_date] >= Today())
)
 
Please suggest how to make it work with the Year, Qtr, and Month slicers.
 
Many thanks!!
2 REPLIES 2
Anonymous
Not applicable

Thanks Lucien.

i created a range - min data and max date based on what the user selected in the Year, Qtr, Month slicers.

Then i counted Active employees based on an overlap in the employee start and end date and in the selected range.

It works!

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Could you pls share a smaple data and expect output result.Remember to remove confidential data.

 

 

Best Regards

Lucien

 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors