Forum Discussion
Ilona
8 years agoFrequent Visitor
DATEDIFF with a filter
Hi, I need to calculate several TATs for my report, but only having number of business days in those TATs. For example, I have a CASE OPEN date and a CASE CLOSE date, I need to calculate the ...
DataInsights
Super User
6 years agoHi Ilona , try this measure:
Business Days from Part Delivery to Repair Date =
VAR vStartDate =
MAX ( ServiceEvent[Part Delivery Date] )
VAR vEndDate =
MAX ( ServiceEvent[Repair Date] )
VAR vBusinessDays =
FILTER (
'Date',
'Date'[Date] >= vStartDate
&& 'Date'[Date] <= vEndDate
&& 'Date'[Is Business Day] = "Y"
)
VAR vResult =
COUNTROWS ( vBusinessDays )
RETURN
vResult
This solution requires the column 'Date'[Is Business Day].