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
IvanS
Helper V
Helper V

Work efficiency calculation

Hi guys,

 

I would need your help with calculating work efficiency for our workers. I have 2 tables - FACT_Tasks and DIM_Users

FACT_Tasks contains following fields:
- Task ID

- Working time (in days)

- Worker name

- Close date

 

DIM_Users contains following fields:
- Worker name

- Employment date

 

Now, what I need to calculate is YTD work efficiency by dividing cumulative sum of working time by nr. of working days until today with following condition:

- if the person joined before 1.1.2022, then to use as denominator NETWORKDAYS(DATE(YEAR(TODAY()), 1, 1), TODAY(), 1)

- if the person joined later than 1.1.2022, then to use as denominator NETWORKDAYS(Employment date, TODAY(), 1)

 

I am somehow struggling to create IF condition in measure, so any help is much appreciated!


Thank you
IvanS

1 ACCEPTED SOLUTION
Bifinity_75
Solution Sage
Solution Sage

Hi @IvanS , If I understood correctly, you have to create a measure similar to this:

Result= SWITCH(
                TRUE(),
                'Your date column' <= DATE(2022,1,1), DIVIDE(sum('Working time'), NETWORKDAYS(DATE(YEAR(TODAY()), 1, 1), TODAY(), 1),"-"),
                'Your date column' > DATE(2022,1,1), DIVIDE(sum('Working time'), NETWORKDAYS(Employment date, TODAY(), 1),"-"),
                "")

Best regards

 

View solution in original post

2 REPLIES 2
Bifinity_75
Solution Sage
Solution Sage

Hi @IvanS , If I understood correctly, you have to create a measure similar to this:

Result= SWITCH(
                TRUE(),
                'Your date column' <= DATE(2022,1,1), DIVIDE(sum('Working time'), NETWORKDAYS(DATE(YEAR(TODAY()), 1, 1), TODAY(), 1),"-"),
                'Your date column' > DATE(2022,1,1), DIVIDE(sum('Working time'), NETWORKDAYS(Employment date, TODAY(), 1),"-"),
                "")

Best regards

 

Thanks soooo much for help! Worked like a charm! 🙂 

 

I just got info to calculate the work efficiency on monthly/quarterly basis. Could you please suggest what will be the way how to calculate nr. of working days in specific month/quarter to get the result?

 

Example:
Worker name - Period (ideally date hierarchy) - Work efficiency

Worker 1 - January - Work efficiency 85%

Worker 1 - February - Work efficiency 70%

 

Thank you

IvanS

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