How to show the value of a field depending on the condition?

I have a field that I just want to show it according to my condition.

For example: If a specific status comes, then I show another column, otherwise not.

I tried this and it didn’t work:

ifelse({cod_stt} = 3, diff_days, ‘0’)

The “diff_days” field is a string field that already comes in my query.

I tried using the “ifelse” and “switch” commands, but it didn’t work.

Thanks

@July It should have worked, But hard to say much without looking at the data.

You can apply that same formula in the query as well. If the goal is just to show diff_days of cod_stt == 3 otherwise "0".

Hi @neelay
I got it. I did in my view on Athena.
Tks!!

1 Like