I have a field called duration_type
that can have the values below and I want to show them in my graphs as the expected_values
field:
duration_type | expected_values |
---|---|
weekly | Week |
monthly | Month |
annual | Year |
Make a new expected_values
field and create the CASE
statement:
CASE
WHEN duration_type = "weekly" THEN "Week"
WHEN duration_type = "monthly" THEN "Month"
WHEN duration_type = "annual" THEN "Year"
END