Forum Discussion
Elisa112
Helper V
1 year agoCompare dates in a summarised table
Hi Experts I have summarise data based on columns from a customer and a training outcome table, Im gtrying to find the number of days from the customer start date to the date they found a job. M...
- Anonymous1 year ago
Hi, Elisa112
Is this the result you expected? If not, please provide more information.
Days to employment = DATEDIFF([Start Date],[Outcome Date],DAY)Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
johnt75
Super User
1 year agoYou could create a measure like
Start to employment =
VAR CustomerID =
SELECTEDVALUE ( 'Customer'[Customer ID] )
VAR StartDate =
SELECTEDVALUE ( 'Customer'[Start Date] )
VAR EndDate =
CALCULATE (
MAX ( 'Training_Outcome'[Outcome Date] ),
TREATAS (
{ ( CustomerID, "Employed" ) },
'Training_Outcome'[Customer ID],
'Training_Outcome'[Type]
)
)
VAR Result =
NETWORKDAYS ( StartDate, EndDate ) - 1
RETURN
Result