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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
_Melenios_
Helper I
Helper I

Calculate Employee Scheduled Hrs Until Resignation Date

Hi amazing team,

 

Need some of your expertise with the following issue.

 

I have Table1 that holds generic employee info and a specific "ResignDate" column( which is blank if N/A).

Then i have Table2 which holds "scheduled_Hrs" for the employees for each date.

 

What i'd like here since i have schedules for a 6 months (or more) period,  is to have a measure that sums the Hrs and  also counts scheduled days  only until the employee's "ResignDate" (if that exists in Table1.) otherwise return the sum Hrs and Count days as normal.

 

Thanks in advance for any sugestions!

 

 

 

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Hours until resign =
SUMX (
    FILTER (
        'Table2',
        VAR ResignDate =
            RELATED ( 'Table1'[Resign date] )
        RETURN
            ISBLANK ( ResignDate )
                || 'Table2'[Date] <= ResignDate
    ),
    'Table2'[Scheduled hours]
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Hours until resign =
SUMX (
    FILTER (
        'Table2',
        VAR ResignDate =
            RELATED ( 'Table1'[Resign date] )
        RETURN
            ISBLANK ( ResignDate )
                || 'Table2'[Date] <= ResignDate
    ),
    'Table2'[Scheduled hours]
)

Thanks @johnt75  

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors