3 Replies Latest reply on Jun 29, 2016 2:40 PM by Ivan Young

# How to use hour calculations

Hi everyone!

I need to do some field calculations using the idea:

IF [Tempo  de Toque] != "" OR [Tempo  de Toque]=("00:00:00")

THEN [Tempo  na Fila]

ELSEIF

[Tempo  na Fila]+([Tempo  de Toque]-1)

END

This calculation in excel is:     =SE(L2<>"";SEERRO(L2-"0:00:01";0);0)   (in portuguese, I dont know how to do this in english)

OBS:  "Tempo de Toque is a field and i have to do this calculation!

Another thing: how I use empty field in tableau?  "" or i have to write "null"  ?

Thanks

• ###### 1. Re: How to use hour calculations

Hi Lara,

It's always good to share some sample data or a workbook if you really want help.  If [Tempo  de Toque] is date time format then you should not be using "".  Check out the ISNULL function in Tableau.  You are also likely to need DATEPART and DATEADD.

Regards,
Ivan

1 of 1 people found this helpful
• ###### 2. Re: How to use hour calculations

Hi Ivan, thanks to answer my question..

The data is like this:

Tempo na fila: 00:01:36  (minutes and seconds)

Tempo de toque: 0:00:05 (just seconds)  the translation in english is: TIME RINGING on telephone to be exactly

I need to do the calculation:

IF tempo de toque = 0 or null (empty), THEN tempo na fila=0

LATER

I take the SUM and i do SUM-1

If this calculation >=11 then this call is ("abandonada")  missed call, in english.

• ###### 3. Re: How to use hour calculations

Hi Lara,

Could you post a few rows of your data?  And is the format of [tempo de toque] and [tempo na fila] text?

Thanks,

Ivan