i'm trying to replicate a couple of OBIEE reports in tableau. Most of the calculated fields in OBIEE have a SQL syntax, eg:
CASE WHEN "ID" IN ('1', '2', '3', '4') THEN 'A'
WHEN "ID" IN ('5', '6') THEN 'B'
Tableau doesnt support IN operators as far as I know, which means I would have to use an if formula and use OR for each number. My formulas are way longer which would take a lot of time.
Is there a method to convert this to a tableau syntax? Referenced columns can just be converted to [ID] or somethting similar
So long as your dimension you're looking at is a string (you can force it as one) then you can use a regular expression. Use a pipe between the values you are looking for.
This is just one example
IF REGEXP_MATCH([Dimension],'Value|Value2|Value3|Value4')=True THEN 'A'
ELSEIF REGEXP_MATCH([Dimension],'Value5|Value6')=True THEN 'B'
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...