8 Replies Latest reply on Nov 30, 2018 9:37 AM by B Kez

# How to calculate average time (hh:mm:ss)

Hello Tableau Genuis,

I am need help calculating the average time per reference and contract ID.

Does anyone have a idea ?

Best.

B.

• ###### 1. Re: How to calculate average time (hh:mm:ss)

Help me understand what you need to do.

For Flat 1, Contract 356889, I see 2:58:50.

What average do you want to see here?  (Or are you looking for the average of all the contracts under Flat 1?)

• ###### 2. Re: How to calculate average time (hh:mm:ss)

Hello Joe,

Thanks for getting back to me.

Contract 356889 has done 99 communications, with a sum of 2:58:50 and average of 0:01:48

That's what I get in excel, I would like to do the same in Tableau.

Can you help ?

Thanks again,

B.

• ###### 3. Re: How to calculate average time (hh:mm:ss)

Hi, B Kez

Please see my solution attached as well as below screenshot for your reference. Hope this helps

ZZ

• ###### 4. Re: How to calculate average time (hh:mm:ss)

Hello Zhouyi Zhang,

thanks for getting back to me,

I have applied your recommendation but, it doesn't work.

• ###### 5. Re: How to calculate average time (hh:mm:ss)

Can you show where you stuck?

ZZ

• ###### 7. Re: How to calculate average time (hh:mm:ss)

B Kez wrote:

Hello Joe,

Thanks for getting back to me.

Contract 356889 has done 99 communications, with a sum of 2:58:50 and average of 0:01:48

SUM([Number of Records]) shows 99.  And you have your total [Seconds] already totaled up, so do

[Seconds] / SUM([Number of Records])

Then pass the value of that calc through your [Volume Telephony hms] logic.

I did that in the attached.

• ###### 8. Re: How to calculate average time (hh:mm:ss)

Thank you