0

I am connecting my tableau server to my prep flow, everything looks good! However, once I want to create a new column with a calc field (a column not in my original data source) the formula shows up as "Valid" but the columns are blank. The formula is below, its about 1000 rows, but i just copied and pasted the first few lines here. Any reason what is going on?

IF [Application Building] = "ALHVL" THEN "AL - Statewide"

ELSEIF [Application Building] = "ALANN" THEN "AL - Statewide"

ELSEIF [Application Building] = "ALBIR" THEN "AL - Statewide"

ELSEIF [Application Building] = "ALDEC" THEN "AL - Statewide"

ELSEIF [Application Building] = "NYHOR" THEN "NY - Other"

ELSEIF [Application Building] = "NYJAM" THEN "NY - Other"

END

Sample In Prep

seth
  • 1
  • 4
  • Most likely it's because the field "[Application Building]" doesn't contain any of the values in your list. In particular, you might need to trim the field to eliminate leading or trailing spaces before you compare it to your values. – Hellion Jun 23 '22 at 22:13
  • Does this answer your question? [ELSE IF 2 errors in Tableau Prep](https://stackoverflow.com/questions/72578448/else-if-2-errors-in-tableau-prep) – Alex Blakemore Jun 27 '22 at 00:22

1 Answers1

0

From above observation we can say it's due to leading or trailing spaces, we can eliminate by using TRIM function. Still have the issue, share a sample data to get into more details.

Mika
  • 36
  • 3