Forum Discussion
Anonymous
2 years agoNot applicable
Modifying Turnaround Time to be more Dynamic
Hi. I have a question related to the calculation (Dax formulas) for SLA metrics on the processing time for Purchase Orders. This is one of them: Time_Turnaround = NETWORKDAYS([Created],[Completi...
- 2 years ago
Anonymous
In our example the 1st one is 5 AM so 4 days is correct, the 2nd one should be 3. I modifed to include 5 as well using >=, please checkTime_Turnaround = VAR __Time = HOUR([Created]) VAR __Diff = NETWORKDAYS([Created],[CompletionDate/Time],1,Distinct(HolidaysTable[Holiday])) VAR __Result = IF( __Time >= 17 , __Diff - 1 , __Diff ) RETURN __Result
Fowmy
Super User
2 years agoAnonymous
I modifed the formula, please check.
Time_Turnaround =
VAR __Time = HOUR([Created])
VAR __Diff = NETWORKDAYS([Created],[CompletionDate/Time],1,HolidaysTable[Holiday])
VAR __Result = IF( __Time > 17 , __Diff - 1 , __Diff )
RETURN
__Result
Anonymous
2 years agoNot applicable
Hello Fowmy , thanks again so much for helping me.
I created the Holiday table (see picture), the holiday date field is therefore 'Holidays'[Date].
However, there is a DAX error (see picture).
Would you please help me correct this error?
Again, thanks a billion!
Aisha
- Fowmy2 years ago
Super User
Anonymous
Please use the following code:Time_Turnaround = VAR __Time = HOUR([Created]) VAR __Diff = NETWORKDAYS([Created],[CompletionDate/Time],1,Distinct(HolidaysTable[Holiday])) VAR __Result = IF( __Time > 17 , __Diff - 1 , __Diff ) RETURN __Result