ifelse( {algo_version}= ‘Simple 1.5_23’ OR {algo_version}= ‘Simple 1.5_62’ OR {algo_version}= ‘Simple 1.5_42’ OR {algo_version}= ‘Simple 1.5_12’, {Imbalance Revenue Monthly Simulation}, NULL)
Now I want the above ‘ifelse’ command to select just the algorithm version starting from ‘Simple1.5_XX’ not other algo version(Simple1.0_XX; Simple2.0_XX).
Is there any other way to write the above query instead of writing each and every algo version starting with ‘Simple1.5_XX’ ?
Hi @Dhiru,
You could try using the contains() function to support this. Then you could just use the number that follows Simple…For example: contains(‘1.5’) and repeat for each ‘1.0’, ‘2.0’, etc.
Hey Brett,
Thank you for the quick response. I have tried to use the Contains as shown below in images. Seems there are syntax errors. In what format should we write the query?
Hi @Dhiru,
Sorry for the confusion on my part, the contains function cannot be nested in an ifelse statement.
Just to confirm again, what output are you looking to achieve from this formula? So, once you have it narrowed down to algo version, what would you then be using that to accomplish?
ifelse( {algo_version}= ‘Simple 1.5_23’ OR {algo_version}= ‘Simple 1.5_62’ OR {algo_version}= ‘Simple 1.5_42’ OR {algo_version}= ‘Simple 1.5_12’, {Imbalance Revenue Monthly Simulation}, NULL)
This is the IFELSE formula I am currently using, and it provides the correct output by selecting the specific algo versions I have specified. However, instead of updating the formula each time when there is a new algo version starting with ‘Simple1.5_XX,’ I am considering using the CONTAINS function, as you suggested. I am not certain how to implement it.