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
Anonymous
Not applicable

Calculated Column to Filter the sum total of Regular Hours over 40

Hi,

I’m trying to create a column to error-check regular timesheet hours that are over 40 for a week.

Columns in the table (TESS):

Employee ID [EMPL_ID]

End of Week TESS[End of Week] 

Type of Hours TESS[TYPE] 

Entered Hours TESS[ENTERED_HRS] 

I’ve tried

R Hours Over 40 =

CALCULATE (

    SUM ( TESS[ENTERED_HRS] ),

    TESS[TYPE] = "R",

    ALLEXCEPT ( TESS, TESS[End of Week] )

)

This is not giving me the results I need. 

I can create a new table and get the desired results:

TESS_R_BY_EOW =

VAR baseTable =

    CALCULATETABLE (

        SUMMARIZECOLUMNS (

            TESS[EMPL_ID],

            TESS[End of Week]         

        ),

        TESS[TYPE] = "R"

    )

RETURN

    GENERATE (

        baseTable,

        VAR R_hours =

            CALCULATE ( SUM ( TESS[ENTERED_HRS] ), TESS[TYPE] = "R" )

        RETURN

            ROW ( "R Hours", R_hours )

    )

Any help will be greatly appreciated.

 

VR

Brad

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Please try:

R Hours Over 40 = 
IF(TESS[TYPE] = "R",
    CALCULATE(SUM(TESS[ENTERED_HRS]),
        FILTER(
            ALLEXCEPT(TESS,TESS[EMPL_ID],TESS[End of Week]),
            TESS[TYPE] = "R")),
    BLANK())

Vlianlmsft_0-1624514193068.pngVlianlmsft_1-1624514216542.png

 

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Please try:

R Hours Over 40 = 
IF(TESS[TYPE] = "R",
    CALCULATE(SUM(TESS[ENTERED_HRS]),
        FILTER(
            ALLEXCEPT(TESS,TESS[EMPL_ID],TESS[End of Week]),
            TESS[TYPE] = "R")),
    BLANK())

Vlianlmsft_0-1624514193068.pngVlianlmsft_1-1624514216542.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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