Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello to all. I have a report with alerts. They are processed by operators like an incident ticket for example.
For each of them I have a start and end date. To calculate their processing time from start to finish I used this measurement.
I am French so the measurement is in French
Total time =
Result = Day:Hours:Minuts:SEC
However, I don't know how to calculate an average processing time compared to this measurement. Can you help me ? Thank you
Charly
Solved! Go to Solution.
Hi @Anonymous ,
You can use datediff() function to get the day, hours, minutes, seconds directly.
Average time may like this(use format() function to exact decimal point):
average time =
VAR _day =
FORMAT (
AVERAGEX ( 'Table', DATEDIFF ( 'Table'[Start date], 'Table'[End date], DAY ) ),
".##"
)
VAR _hour =
FORMAT (
AVERAGEX ( 'Table', DATEDIFF ( 'Table'[Start date], 'Table'[End date], HOUR ) ),
".##"
)
VAR _minute =
FORMAT (
AVERAGEX (
'Table',
DATEDIFF ( 'Table'[Start date], 'Table'[End date], MINUTE )
),
".##"
)
VAR _seconds =
FORMAT (
AVERAGEX (
'Table',
DATEDIFF ( 'Table'[Start date], 'Table'[End date], SECOND )
),
".##"
)
RETURN
_day & ":" & _hour & ":" & _minute & ":" & _seconds
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can use datediff() function to get the day, hours, minutes, seconds directly.
Average time may like this(use format() function to exact decimal point):
average time =
VAR _day =
FORMAT (
AVERAGEX ( 'Table', DATEDIFF ( 'Table'[Start date], 'Table'[End date], DAY ) ),
".##"
)
VAR _hour =
FORMAT (
AVERAGEX ( 'Table', DATEDIFF ( 'Table'[Start date], 'Table'[End date], HOUR ) ),
".##"
)
VAR _minute =
FORMAT (
AVERAGEX (
'Table',
DATEDIFF ( 'Table'[Start date], 'Table'[End date], MINUTE )
),
".##"
)
VAR _seconds =
FORMAT (
AVERAGEX (
'Table',
DATEDIFF ( 'Table'[Start date], 'Table'[End date], SECOND )
),
".##"
)
RETURN
_day & ":" & _hour & ":" & _minute & ":" & _seconds
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I suggest you calculate average time first then (Ex: Divide (TotalTimeTaken, No of Tickets, 0)) use this to derive other variables in the below snapshot.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |