Skip to main content
Solved

Contains function within a IF condition

  • May 5, 2023
  • 5 replies
  • 291 views

Forum|alt.badge.img+6

Hello, 

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!

Best answer by WILLIAM.MONTERO

Hello Alix, 

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

Best,

William

5 replies

abhilashsawla
Master Author
Forum|alt.badge.img+7

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?

 


Nathan
Employee
Forum|alt.badge.img+12
  • Employee
  • May 10, 2023

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 ?


Forum|alt.badge.img+6
  • Author
  • Wallflower
  • May 15, 2023

Hello, 

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 

 


Forum|alt.badge.img+1

Hello Alix, 

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

Best,

William


Forum|alt.badge.img+6
  • Author
  • Wallflower
  • May 16, 2023

Hello,

Yes it is… thanks a lot!!