Forum Discussion
BonnieTseng
4 years agoNew Member
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...
- 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] ) ) ) )
Jihwan_Kim
Super User
4 years agoHi,
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] )
)
)
)
BonnieTseng
4 years agoNew Member
thank you ! it works 🙂