Forum Discussion
Calculate average time per day
- 5 years ago
Trosa_220568
You can create a measure as follows:Average Process Time = FORMAT( AVERAGE( Table1[Process Time] ), "hh:mm:ss") - 5 years ago
Hi Trosa_220568 ,
with DAX you can do it like this. It looks a little bit weird but the time formating with DAX is buggy. 🤔
Average Process Time = VAR _AverageTimeInDecimal = CALCULATE ( AVERAGE ( 'Table'[Process Time] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) ) VAR _Hours = INT ( _AverageTimeInDecimal * 24 ) VAR _Minutes = INT ( ( _AverageTimeInDecimal - _Hours / 24 ) * 24 * 60 ) VAR _Seconds = INT ( ( _AverageTimeInDecimal - _Hours / 24 - _Minutes / 1440 ) * 24 * 3600 ) RETURN FORMAT ( _Hours, "00\:" ) & FORMAT ( _Minutes, "00\:" ) & FORMAT ( _Seconds, "00" )With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut) - 5 years ago
Hi, Trosa_220568
If you want to calculate the average processing time in hours and minutes per day, you need to make some small adjustments to CNENFRNL ‘s method.
When you specify the column to group by and the desired output, you need to select the Operation "Average" rather than Operation "Sum".
Result:
Best Regards,
Community Support Team _ Eason
Trosa_220568
You can create a measure as follows:
Average Process Time = FORMAT( AVERAGE( Table1[Process Time] ), "hh:mm:ss")
How do I get this to work and apply any filters I have?