Hi @Dhiru,
If I understand correctly, you may need to use a calculated field instead of a direct filter that would something like this: ifelse(in({algo_version}, ['a', 'b', 'c']), {Actual Revenue}, in({algo_version}, ['x', 'y', 'z']), {Monthly Imbalance}, NULL)
Or, you could return each field dependent on whatever algo version if you’d like to use 2 separate calculated fields:
Field 2 (You’ll also need to add ‘OR’ in between - added below to assist):
ifelse( {algo_version}= ‘Simple1.a_1.b8’ OR {algo_version}= ‘Simple1e5_1.f7’ OR {algo_version}= ‘Simple4.5_1.992’ OR {algo_version}= ‘Simple1.f_1.d9’, {Imbalance Revenue Monthly Simulation}, NULL)
Field 3:
ifelse({algo_version} = ‘v2_intraqh_a_b_c’, {Actual Revenue}, NULL )
Hello Brett,
The above query worked just had another question related to that:
Suppose my algo versions are following:
Simple 1.5_23
Simple 1.5_12
Simple 1.5_42
Simple 1.5_62
Simple 1.0_44
Simple 1.0_56
Simple 1.0_22
Simple 1.0_67
Simple 2.0_81
Simple 2.0_92
And I am writing the below if else query
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?
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’)