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
mmelerof
New Member

Extra Hours

Hi everybone,

 

Well, in my model, i have a column call "Horas Trabajas" it mean "Work Hours".

 

I want to know the extra hour my employments do, so if the work more than 160 hours per month, they are getting extra hours.

 

I do this but the summatory its wrong.

 

mmelerof_0-1674208245737.png

 

As you can see, they dont have extra hours but the summory is 4.021,72 hours.

 

This is the formula y used: 

Horas Extras = CALCULATE( IF(SUM('Enero 2023'[Horas Trabajadas])> 160 , SUM('Enero 2023'[Horas Trabajadas]) - 160 , 0))

 

 

 

2 REPLIES 2
tamerj1
Super User
Super User

Hi @mmelerof 

please try

Horas Extras =
SUMX (
VALUES ( 'Enero 2023'[Empleado] ),
CALCULATE (
VAR Extras =
SUM ( 'Enero 2023'[Horas Trabajadas] ) - 160
RETURN
IF ( Extras > 0, Extras, 0 )
)
)

Mahesh0016
Super User
Super User

@mmelerof 

 

This is the formula y used: 

Horas Extras = CALCULATEIF(SUM('Enero 2023'[Horas Trabajadas])> 160 , SUM('Enero 2023'[Horas Trabajadas]) - 160 , 0))


#My Solutions
Horas Extras = calculate(SUM('Enero 2023'[Horas Trabajadas]) - calculate(SUM('Enero 2023'[Horas Trabajadas]),filter(Table,[Total Work Hours]>160)))

@mmelerof If this post helps, please consider accept as solution to help other members find it more quickly and Appreciate your Kudos.

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.