Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculation between Start and End Date

Hi   I have one table named "AbsenceDetailsFact" with columns named date_start, date_end, absence_days. following snap is the data from the table (sample data for one employee). I want to map fact ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous ,

    Yes, it is possible. I modify my formula to add two variable to get current start,end date for calculation.

    Workday =
    VAR currStart =
        MIN ( Table[Start] )
    VAR currEnd =
        MAX ( Table[End] )
    RETURN
        COUNTROWS (
            FILTER ( CALENDAR ( currStart, currEnd ), WEEKDAY ( [Date], 2 ) < 6 )
        )
    

    Regards,

    Xiapxin Sheng