Skip to main content

Hi there,

 

I have been trying to figure a way around this for a a few days now without much avail. I have associated yellow to value "2" to show up in our dashboard. We do not have a 2 right now in our data source but might have it in the future.

At the moment I just have a dummy value to show the yellow, but I would like to not have any value for yellow in our dashboard (2) and still show. How could I do that?

If  [Health_Int]=1 and [Status]= "OPEN"then "RED"

 

 

ELSEIF  STR([Health_Int])= "2" and [Status]= "OPEN" THEN "YELLOW"

 

 

ELSEIF [Health_Int]=3 and [Status]= "OPEN" THEN "GREEN"

 

 

ELSEIF [Health_Int]=4 and [Status]= "OPEN" THEN "GREEN"

 

 

elseif ([State]="Active" and [Risk Type]="N/A" OR [State]="Planning") then "N/A"

 

 

END

 

Assigning colors to values that don't exist, yet?

 

I would appreciate any help.

 

Thanks so much.

5 answers
  1. Jul 24, 2019, 9:15 PM

    OK, here's what I did ....

     

    This is what the data looks like

     

    OK, here's what I did ....

     

    So let's create a graph

     

    2019-07-25+07_03_59-Tableau+-+Book11.png

     

    create a calculated field with a dummy value and drop that on Color

     

    2019-07-25+07_04_34-Assigning+colors+to+values+that+don%27t+exist%2C+yet_+_Tableau+Community+Forums.png

     

    Edit the colour palette to make yellow look like yellow

     

    2019-07-25+07_04_48-Assigning+colors+to+values+that+don%27t+exist%2C+yet_+_Tableau+Community+Forums.png

     

    Change to another dummy value ...  repeat as required for values that you know are not in the data

    2019-07-25+07_05_11-Tableau+-+Book11.png

     

    Edit colors again to assign the right colour

     

    2019-07-25+07_05_29-Assigning+colors+to+values+that+don%27t+exist%2C+yet_+_Tableau+Community+Forums.png

     

    it looks silly, but we're almost there

     

    2019-07-25+07_05_46-Assigning+colors+to+values+that+don%27t+exist%2C+yet_+_Tableau+Community+Forums.png

     

    now add the proper calculation and it works   

     

    2019-07-25+07_06_19-Assigning+colors+to+values+that+don%27t+exist%2C+yet_+_Tableau+Community+Forums.png

     

    Change the dummy values as often as you need to make sure that Tableau has "seen" the values, then use those same values in your proper calculation.

0/9000