3 Replies Latest reply on Nov 25, 2018 11:22 AM by Frederick Page

    IF Statements to Include 1 thing in each IF

    Frederick Page

      So I have a dimension that only has 4 outputs. It will either be null, Tier 1, Tier 2, or Tier 3. I want to create one calculated field that will allow me to filter on the data in 3 ways. I want to filter on Tier 1 and include all Tier 1 AND all null entries. I want to filter on Tier 2 and include all Tier 2 AND all null entries. And I want to filter on tier 3 and include all Tier 3 AND all null entries. So basically I want to be able to have the null entries grouped into each of the three Tiers when I filter on them.

      Right now my IF statement looks like what is below. However, Tableau only includes the null entries in the Tier 1 portion. When I choose Tier 2 or Tier 3, there are no null entries.

       

      If ISNULL([Mapped Tier Description])=True THEN "Not Crossed"

      ELSEIF CONTAINS([Mapped Tier Description], "TIER 1") = True OR ISNULL([Mapped Tier Description])=True THEN "Tier 1"

      ELSEIF CONTAINS([Mapped Tier Description], "TIER 2") = True OR ISNULL([Mapped Tier Description])=True THEN "Tier 2"

      ELSEIF  CONTAINS([Mapped Tier Description], "TIER 3") = True OR ISNULL([Mapped Tier Description])=True THEN "Tier 3"

      END

       

       

      Thanks!!