9 Replies Latest reply on Nov 27, 2017 7:07 PM by Shinichiro Murakami

# Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

I have a time series in seconds representing a waiting time and I would like to:

1] Calculate the average of this series (over a variable period of time).

Q: How do a calculate the average of the series? I am able manage to set th variable time period.

2] I want to display this average waiting time in a readable DD:HH:MM:SS format

Any help would be very appreciated. Thank you.

• ###### 1. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Emmanuael

Please attache sample data as packaged workbook(**.twbx).

The answer can be completely different based on what you have.

Thanks,

Shin

• ###### 2. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Shin,

A sample is attached and the calculation I would like to do is on the series "join delay".

Thank you,

Emmanuel

• ###### 3. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Emmanuel

I am not sure which average you want, and assuming Ts started Str as dimension.

Because your number is based on second and Tableau's calculation is based on "day" just same as Excel,

You can convert sec to each units.

Thanks,

Shin

• ###### 4. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Shin,

Thank you so much: it's very helpful I managed to change the formatting of the series, so it is now more easy to read.

But unfortunately the calculation of the average does not work on my side, probably because my data source is a sql database?

• ###### 5. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Emmanuel,

I don't think SQL matters.

Could you attach screen shot or something? What is the issue?

Shin

• ###### 6. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

A screenshot is attached Shin.

I just don't see "AVERAGE" in the calculation field :-(

• ###### 7. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

HI Emmanuel,

The resolution is too small, and I cannot read anything...

Regards,

Shin

• ###### 8. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Hi Shin,

A screenshot is also attached with higher resolution

Regards,

Emmanuel

• ###### 9. Re: Calculation: Average of a time series in seconds and conversion in a DD:HH:MM:SS format

Because "Join Delay ***" is String, there is no way to "Aggregate" other than "count/max,min".

What do you want to do?

You should calculate BEFORE changing it to string.

And please mark my answer as correct if you fixed the problem,.

(Not from inbox view, from original post)

Regards,

Shin