4 Replies Latest reply on Oct 12, 2018 7:47 AM by swaroop.gantela

    Tableau Desktop - Color Assignment to values which could appear in a later period

    Dennis Gesthuysen

      Hello together,


      i got the following Question regarding color assignments to values which are not in the actual period of data but could appear in a later one.


      Following scenario:


      I have multiple buckets for numeric data E.g. 0 to 100


      First Bucket: 0-20 should be displayed in 'red'
      Second Bucket: 21-80 should be displayed in 'yellow'
      Third Bucket: 81-100 should be displayed in 'green'
      "Else" Bucket: All other values which could appear, should be displayed in 'black'

       

      Actually i am doing this with a calculated field:
      ----------
      IF [Column] <= 20 THEN "red"
      ELSEIF [Column] > 20 AND [Column] <= 80 THEN "yellow"
      ELSEIF [Column] > 80 AND [Column] <= 100 THEN "green"
      ELSE "black"
      END
      ----------


      The Problem now is, if in this period of data are only values available from 0-100 and i am putting this calculated field on the colormarks, then i can only edit the colors for the 'red', 'yellow' and 'green' bucket and i´m not able to set a color for the 'black' bucket because i don´t have any sets of data for this atm.
      If a value will be available outside this given range above in a later period of data then it will be shown up in the colorpane with the name 'black' but a random picked color by Tableau Desktop.
      What i want without creating a "dummy" set of data for this scenario to assign the correct color by myself is, how am i able to do this?
      (Maybe a specific function within the calculation to set a real color and not only the name or is there another simple solution and i am thinking way too complicated?)


      Many thanks and regards,
      Dennis