Forum Discussion
Anonymous
6 years agoNot applicable
Calculating difference between two time values column and finding its average
Hi Everyone,
I need your help to solve a problem that I am facing.
I have two columns which have time based value as shown in the picture:
I found their difference using the formula Duration.ToText([Reached Merchant]-[Assigned At])), I got the result as follows:
Now in order to find average of "Avg store reach time", I made a new measure as follows:
Measure = FORMAT(AVERAGE(Sheet1[Avg store reach time]),"HH:MM:SS")
Now instead of getting an average of the column "Avg store reach time" I am getting the below error:
Please help me with this. Thank you
RK
Hi Anonymous
try a measure
Measure = format(calculate(averagex('Table',TIMEVALUE('Table'[Avg store reach time]))),"HH:MM:SS")or
Measure = format(averagex('Table',TIMEVALUE('Table'[Avg store reach time])),"HH:MM:SS")depends on business logic
8 Replies
- az38Community Champion
Hi Anonymous
try a measure
Measure = format(calculate(averagex('Table',TIMEVALUE('Table'[Avg store reach time]))),"HH:MM:SS")or
Measure = format(averagex('Table',TIMEVALUE('Table'[Avg store reach time])),"HH:MM:SS")depends on business logic
- Pragati11Super User
Hi Anonymous ,
"Avg Store reach time" is of STRING datatype because your calculation as below returns a text type of value:
Duration.ToText([Reached Merchant]-[Assigned At]))
Thanks,
Pragati