Solved

Contains function within a IF condition

  • 5 May 2023
  • 5 replies
  • 166 views

Userlevel 3
Badge +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!

icon

Best answer by WILLIAM.MONTERO 15 May 2023, 22:07

View original

5 replies

Userlevel 4
Badge +6

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 6
Badge +11

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 +6

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 

 

Userlevel 2
Badge +1

Hello Alix, 

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

Best,

William

Userlevel 3
Badge +6

Hello,

Yes it is… thanks a lot!!

Reply