Forum Discussion
SLA calculation open calls
Hi,
Im trying to calculate if a SLA for open calls is breached or not with the following columns;
Startdate, targetdate.
If the startdate of a call, and current date > targetdate, the sla is breached.
if the startdate of a call and current date < targetdate, the sla is not breached
I now use the following measure, but this doesnt include the current time argument;
How can I include current time argument? I keep getting errors when I try using NOW() or TODAY()
TechR21 , try measures like
SLA breached = COUNTROWS(filter( 'calls','call'[startDate]> Today() && 'calls'[TargetDate] > Today() ) )
SLA not breached = COUNTROWS(filter( 'calls','call'[startDate]<= Today() && 'calls'[TargetDate] <= Today() ) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
2 Replies
- amitchandak
Super User
TechR21 , try measures like
SLA breached = COUNTROWS(filter( 'calls','call'[startDate]> Today() && 'calls'[TargetDate] > Today() ) )
SLA not breached = COUNTROWS(filter( 'calls','call'[startDate]<= Today() && 'calls'[TargetDate] <= Today() ) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- TechR21
Helper V
i now see that there was a mistake in the query i provided, it changed from html i think.
so basically when a call is still open at current date, and this current date is after the sla target date then its breached the SLA. When a call is still open at current date, and this current date is before the sla target date then its not breached. But when seeing your code I can use it, tweak it a bit , and now it works. thanks!