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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
BYENER
Helper V
Helper V

Use another calculation for values before a specific date

Hi All,

 

I hope someone can help me. I am using a measure to sum hours and divide by 8 and multiply by 7.5, but I don't want to do the last step (/8 * 7.5) for hours after 1st of January 2024. How can I fix this in my measure? The measure below is not working.

 

Thanks a lot!

 

Bruto Hours X =

VAR StartDate = DATE ( 2001, 01, 01 )
VAR EndDate =   DATE ( 2023, 12, 31 )
VAR previousCalculation = IFERROR(SUM(Hours[X]),"") /8*7.5
VAR newCalculation = IFERROR(SUM(Hours[X]),"")

return

IF(DATESBETWEEN(Hours[Datum],StartDate,EndDate),previousCalculation,newCalculation)
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@BYENER 

Try this measure:

Bruto Hours X =
SUMX (
    Hours,
    IF (
        Hours[Datum] < DATE ( 2024, 01, 01 ),
        DIVIDE ( Hours[X], 8 ) * 7.5,
        Hours[X]
    )
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
BYENER
Helper V
Helper V

@Fowmy  thanks a lot! It's working.

Fowmy
Super User
Super User

@BYENER 

Try this measure:

Bruto Hours X =
SUMX (
    Hours,
    IF (
        Hours[Datum] < DATE ( 2024, 01, 01 ),
        DIVIDE ( Hours[X], 8 ) * 7.5,
        Hours[X]
    )
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
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 Kudoed Authors