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 that how many days in Start time & End time. thank you
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] ) ) ) )
3 Replies
- Jihwan_Kim
Super User
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] ) ) ) )- BonnieTsengNew Member
thank you ! it works 🙂
- rajulshah
Resident Rockstar
Hello BonnieTseng ,
Can you please provide the sample file removing confidential information? It would be easier solving that way.