Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on November 22, 2020 2:45AM
Likes: 0
Replies: 1
Hi Team,
I am having a use case where I have to create a new column based on 3 columns X, Y and Z. If a value of X is in between the range of columns Y and Z then the new column has the value X else the complete row is deleted. I am using a postgre in - database sql engine for computation. Can you please help me in writing a formula which best suits this use case ? ( I couldn't use in between in the formula as it is showing me an error, may be my usage is wrong in this case).
Note: All the columns are date columns
Please do the needful !
Hi @Tsurapaneni
If all columns are correctly parsed as Date, then you can
if(X <= Z && X >= Y, X, "")
If the columns are not parsed as Date (their meaning is Date (unparsed) or something else), then you should first use the "Parse date" step to do so.
Let me know if this helped
Cheers,
Mehdi