Forum Discussion

BonnieTseng's avatar
BonnieTseng
New Member
4 years ago
Solved

How to calculate working days

I have two tables. The one is user call data (including start time and end time )   The anthoer one is calendar (including working day)   how can i calculate user call's data t...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    I am not sure how your expected outcome looks like, but please check the below picture and the attached pbix file.

    I tried to create a sample pbix file like below.

     

     

    Count working days measure: =
    IF (
        HASONEVALUE ( Data[ID] ),
        COUNTROWS (
            FILTER (
                'Calendar',
                'Calendar'[Working day] = "Working day"
                    && 'Calendar'[Date] >= MAX ( Data[Startdate] )
                    && 'Calendar'[Date] <= MAX ( Data[Enddate] )
            )
        )
    )