4 Replies Latest reply on Nov 6, 2018 11:33 PM by Penn Wang

    How to create a calculation field based dropdownlist with certain values

    Penn Wang

      Hi everyone,

       

      I am creating a calculation field based dropdownlist (see below) to filter major airlines in New Zealand based on the flight number.

       

      IF STARTSWITH([Flightnumber], 'ANZ')

      OR STARTSWITH([Flightnumber], 'NZM')

      OR STARTSWITH([Flightnumber], 'RLK')

      THEN 'AirNZ'

      ELSEIF STARTSWITH([Flightnumber], 'JST')

      OR STARTSWITH([Flightnumber], 'SCR')

      THEN 'Jetstar'

      ELSEIF STARTSWITH([Flightnumber], 'SDA')

      THEN 'Sounds Air'

      ELSE 'Other'

      END

       

      "Other" option in the dropdownlist means the flight numbers that don't start with ANZ/NZM/RLK/JST/SCR/SDA. The problem is I don't want to show up this option "Other" in the dropdownlist filter and the chart (the red line as below). I tried to delete the command "ELSE 'Other'" in the calculation field but it ended up showing "Null" instead. Is there any way that I can achieve this? Thank you!

      Untitled.png