title: How to label (color) Dimension based on Measure value in tableau
body: <p><strong>Requirement Description:</strong></p>
  
  <p>For a state,there are four assets.Total no of outliers has been calculated for each asset.If the total no of outliers are above certain threshold,the field would be highlighted as Red,green and amber accordingly.</p>
  
  <p>And the next step of requirement is if any one of the asset is Red,the country dimension field should be highlighted as Red which indicates that an asset in this particular state is in critical condition.</p>
  
  <p><strong>Whatever Done</strong> </p>
  
  <p>I have done the below calculated field to achieve the first set of requirement</p>
  
  <pre><code>IF [Total Outliers] &gt; 50 THEN "RED"
  
  ELSE IF [Total Outliers] &gt; 45 THEN "AMBER"
  
  ELSE "GREEN" END 
  END 
  </code></pre>
  
  <p>and got the result like this (Below image) </p>
  
  <p><a href="http://i.imgur.com/Jp8WkrL.jpg" rel="nofollow">http://i.imgur.com/Jp8WkrL.jpg</a>.</p>
  
  <p>BUt I dont want the asset code to be shown in the report.If i remove the field Asset Code from the shelf,all the value changes to red color because its getting aggregated for State (Total outlier count gets sum up and exceeds 50 according to my calculated field) </p>
  
  <p>i want in such a way </p>
  
  <p><strong>For eg :</strong> Maryland has four Asset ->  one of them is "RED" and other three are "GREEN"</p>
  
  <p>So Now IF any one of the Asset indicates RED then whole Maryland Should be RED
  IF not AMBER , IF not GREEN</p>
  
  <p>So i want some output like this attached below</p>
  
  <p><a href="http://i.imgur.com/vrNbl38.jpg" rel="nofollow">http://i.imgur.com/vrNbl38.jpg</a></p>
  
  <p>I tried so much even like below code </p>
  
  <pre><code>IF (
    ATTR([State])="Florida" AND 
   ((ATTR([Asset Code]) = "LM 3400" AND [Outlier Analysis_2]= "RED") OR 
   (ATTR([Asset Code]) = "PG 8167" AND [Outlier Analysis_2]= "RED"))
    ) OR
  
   ( 
    ATTR([State])="Kansas" AND 
   ((ATTR([Asset Code]) = "FS 3025" AND [Outlier Analysis_2]= "RED") OR 
   (ATTR([Asset Code]) = "FS 8245" AND [Outlier Analysis_2]= "RED") OR
  (ATTR([Asset Code]) = "MS 1945" AND [Outlier Analysis_2]= "RED") OR
  (ATTR([Asset Code]) = "PG 6013" AND [Outlier Analysis_2]= "RED"))
  )
  then "RED_1" END 
  </code></pre>
  
  <p>but all i get is "RED" for all states whenever i remove ASSETCODE..Where am i going wrong? Is it Possible?</p>
  
  <p>Thank You.</p>