Forum Discussion
SLA Calculation based on multiple criteria
Hi Anonymous ,
You can create column Datediff to calculate days between Date_Requested and Date_Presented in t_Data table.
Datediff = DATEDIFF(t_Data[Date_Requested],t_Data[Date_Presented],DAY)
Then, create measure Filter, and put measure Filter to the Visual Level Filter of visual displaying column Datediff, and select option "is not blank".
Filter = var quarter= ROUNDUP(MONTH(MAX(t_Data[Date_Presented]))/3,0)
var day_presented=DAY(MAX(t_Data[Date_Presented]))
var day_requested=DAY(MAX(t_Data[Date_Requested]))
var day_21=EOMONTH(MAX(Table2[Date]),0)-21
return IF (
COUNTROWS ( ALLSELECTED ( Table2[Date] ) ) < 1,BLANK (),
IF(quarter<(ROUNDUP(MONTH(MAX(Table2[Date]))/3,0))||day_requested>day_21||day_presented>EOMONTH(MAX(Table2[Date]),0),BLANK(),1))
When make some selections in slicer, return result showing picture below.
Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EZv4vef4wwNFhuSlZd8fqw8B2LTT-nlMFYA8nzGXOjgFzQ?e=DSGWJx
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xicai parry2k thank youso so much!
It really works the way it's supposed to.
As you can see below, I have filtered out Saturdays+ Sundays.
However, the DATEDIFF between "Date Demande" & "Date Presented" is still summing all days (including weekends and holidays). How can I tackle this, even if I have the filter DayofWeekNumber set only for weekdays.
Thank you !