Forum Discussion
Calculate Average time
Should I tipe the code like this in a measure ? Because the measure is not recognized and it doesn't work. Sorry i'm quite new with those calculations.
I put the file here:
- SRK_237 years agoHelper I
Hi AlB , I did your calculation here and the average seems wrong, or maybe I don't understand something. In the example attached, we have a session length at 2 minutes 22 secondes, and the average on the session is 2.37 in your calculation; the average should be 2:22 as well (as we focuse on only one session). Do you know what I mean ?
(File attached)
- AlB7 years agoCommunity Champion
Hi SRK_23
Yeah, it's correct. That's the same. I said earlier that the measure shows the result in minutes
2,37 minutes is 2 mins and 22 seconds, 2:22
- AlB7 years agoCommunity Champion
Hi SRK_23
If you wanted the result in the format Mins:secs instead, you could do something like:
AverageSessionTime_Mins_Secs = VAR __AverageSessionTime= AVERAGEX ( VALUES ( dm_pageview_company[Duration_Calc] ); dm_pageview_company[Duration_Calc] ) RETURN MINUTE(__AverageSessionTime) & ":" & SECOND(__AverageSessionTime)