3 Replies Latest reply on Oct 15, 2018 10:45 AM by Hari Ankem

    Categorical color legends set with dummy sheet

    anita.tasavanh.0

      I have a metric whose values change from a percentage (%) value or a dollar ($) value. Because of this, I have built a calculation on top of the aggregation to neatly format (assign $ or %) based on a parameter. What I'm finding is that I am having trouble retaining or anticipating color legends unless they appear in the data set. Otherwise I'll get new values and have to go in and set the color legend correctly. I wanted to use an excel sheet of the values and set the color range permanently so it will be common across datasources and sheets. However, the way I built my calculation (and unfortunately cannot change because of the formatting issue) is resulting in a string calculation under the measures pane. I'm not sure if I can link the two fields.

       

      Here is an example:

       

      IF SUM([Profit]) < 10000

      then "< $10,000"

      ELSEIF sum([Profit]) <20000

      THEN "$10K to $20K"

      ELSEIF sum([Profit]) <30000

      THEN "$20K to $30K"

      ELSEIF sum([Profit]) <40000

      THEN "$30K to $40K"

      ELSEIF sum([Profit]) <50000

      THEN "$40K to $50K"

      ELSEIF sum([Profit]) <60000

      THEN "$50K to $60K"

      ELSEIF sum([Profit]) <70000

      THEN "$60K to $70K"

      ELSEIF sum([Profit]) <80000

      THEN "$70K to $80K"

      ELSEIF sum([Profit]) <90000

      THEN "$80K to $90K"

      ELSE "$90K+"

      END

       

      Has anyone found a way to set categorical color legends without needing them to appear in the data first? I have attached a superstore example. Right now, the current view doesn't show anything $50k to $60k. How can I set the other values without data representing that?