I want to create a measure that counts the working days between two dates that have been selected in a slicer. For now I can calculate the days between the selected dates, but I cannot exclude the weekend days.
Days =
/*We get the first and last date from the slicer*/
VAR First = CALCULATE ( MIN ( Date[Date] ), ALLSELECTED ( Date[Date] ) )
VAR Last = CALCULATE ( MAX ( Date[Date] ), ALLSELECTED ( Date[Date] ) )
/*We calculate the days between the two dates*/
RETURN
DATEDIFF ( First, Last, DAY )