Nested if in TARGIT Data Discovery Datasources Format Editor

Dear community,

I have a datasource with three numeric fields with a number of incidents occured during a shift ("Nacht", "Früh","Spät"). Now I want to add a new column "Schicht" as a dimension with the name of the shift.

Here's my syntax:

&if(&Nacht>0,'Nacht',&if(&Spät>0,'Spät',&if(&Früh>0'Früh',' ')))

TARGIT Syntax checker says the syntax is ok, but I don't get any values in my new column.

Any idea?

Best regards

Thomas

0

Comments

2 comments
  • Hi Thomas,

    I think your &if is causing the problem.

    Try replacing "&if" with just "if" in all three places. That should do the trick. (Don't know why TARGIT thinks the other syntax is correct.)

    If you face further problems, try replacing 'Nacht' with "Nacht" etc.

    BR / Ole

    1
  • Thanks Ole!
    As always a fast and helpfull answer:
    The correct syntax looks like that:

    if(&Nacht>0,"Nacht",if(&Spät>0,"Spät",if(&Früh>0,"Früh"," ")))

    2

Please sign in to leave a comment.

Didn't find what you were looking for?

New post