2 Replies Latest reply on Feb 20, 2019 6:51 AM by Amosh Neupane

    Help with Categorizing Data into Buckets!

    Amosh Neupane

      Hello All,

       

      I'm new to tableau and stuck at this problem for a bit: I am hopping to categorize data from one column into buckets by using four different conditions. There are four different benchmarks for each unique "rpt_metric" and I'm having a hard time executing this task. The error message I keep receiving is, "Expected END to Match IF at character 322." To give you an example:

       

      rpt_metric
      metric percentage
      Header 3
      AHT700
      CEI_Overall_Top_Box_7pt701
      Overall_Call_Quality702
      Safeguard704
      AHT705
      AHT706
      SAfeguard707

       

       

      IF MAX(([rpt_metric])) = "AHT" THEN

      IF [Metric Percentage] <= <insert benchmark here> THEN "GREEN"

      ELSEIF [Metric Percentage] <= <insert benchmark here> THEN "YELLOW"

      ELSE "RED"

      OR

      IF MAX(([rpt_metric])) = "CEI_Overall_Top_Box_7pt" THEN

      IF [Metric Percentage] >= <insert benchmark here> THEN "GREEN"

      ELSEIF [Metric Percentage] >= <insert benchmark here> THEN "YELLOW"

      ELSE "RED"

      OR

      IF MAX(([rpt_metric])) = "Overall_Call_Quality" THEN

      IF [Metric Percentage] >=<insert benchmark here> THEN "GREEN"

      ELSEIF [Metric Percentage] >= <insert benchmark here> THEN "YELLOW"

      ELSE "RED"

      END

      OR

      IF MAX(([rpt_metric])) = "Safeguard" THEN

      IF [Metric Percentage] >= <insert benchmark here> THEN "GREEN"

      ELSEIF [Metric Percentage] >= <insert benchmark here> THEN "YELLOW"

      ELSE "RED"

      END

      END

       

      I have seen a couple of forum responses about similar topics and I tried incorporating them into my sheet, but to be frank, I am rather lost. Any and all help will be appreciated.