Hi all,
I’m new in Quicksight. I am trying to add conditions in the if else statment, but I am getting the error. Can you guys let me know how this can be fixed.
Basically I want to create a new column where the calculation depends on whether the container ID column contains “#0” or not. If it does, I’d subtract close time from stage time; if it doesn’t, I’d subtract event time from staging time.
Hello @cijod, just to clarify, would your container_id value have multiple numbers but you just want to check if it has a 0, or are you wanting to check if it is the number 0? I’ll write an option for both just in case.
In order to use the contains function in Quick Sight, the value being checked needs to be a string. So you can convert the value to a string, check for a 0, then return the expected value. Otherwise, if you want to check if it equals a number, you can use the 2nd calculation.
I’ll mark my response as the solution, but please let me know if you have any follow-up questions. Thank you!