Contains function within a IF condition

Userlevel 3
Badge +3


I want to create a if function, in which the logical test is a contains function. If the result from contains function is TRUE => put a value from a dimension, if the result is FALS => put another value from a dimension. 

I tried to do that like this (in a column dimensioned into FF_fg_non_Ankorstore, supporting the logical test): IF((CONTAINS("FF",TL_OLC.'Lb Charge Type')=  TRUE,FF_fg_non_Ankorstore."FMV",FF_fg_non_Ankorstore."AKS")


But it is not working. Could someone help me on that ? Thanks a lot!

5 replies

Userlevel 4
Badge +5

Hi @Alix Noyon 

I need some more details like:

  1. What is the target metric dimensions and data type?
  2. What is the error message getting on pigment?


Userlevel 5
Badge +6

hey Alix,


this should work well. So Abhilash is right we need to know where you are typing it. Is it a property of TL_OLC ?

Userlevel 3
Badge +3


sorry for the delay! 

  • target metric is value from “FF_fg_non_Ankorstore”, would be “TRUE” or “FMV”, data type is dimension.
  • Message error is “Error: Syntax error: cannot validate formula”.

It does not work like this 


Userlevel 1

Hello Alix, 

Could the issue be that you have 3 opening parentheses but only 2 closing parentheses?



Userlevel 3
Badge +3


Yes it is… thanks a lot!!