<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Conditionally format dashboard indicator color based on selection in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/conditionally-format-dashboard-indicator-color/m-p/1223498#M48408</link>
    <description>&lt;P&gt;I am trying to conditionally format the text color of an indicator in a dashboard based on the selected slice of a pie chart. The indicator shows the sum of features and when a slice of the pie chart is selected, the indicator is filtered to only show the sum of features in that year. I have been able to make the color conditional on the count of features, but have been unable to make the color dependent on the selected year. My current code is below:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var c = $datapoint["count_x"]
var color = When(
    c == 1 ,'#A7C636',
    c == 3 ,'#149ECE', '#000000')

return {
    middleText: $datapoint["count_x"],
    middleTextColor: color,
    middleTextOutlineColor: '',
    middleTextMaxSize: 'large',
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My biggest issue is being unable to reference the feature itself, rather than the count of features. Attribute X is the year that I would like to sort by.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 18:35:29 GMT</pubDate>
    <dc:creator>ehuisman</dc:creator>
    <dc:date>2022-10-19T18:35:29Z</dc:date>
    <item>
      <title>Conditionally format dashboard indicator color based on selection</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditionally-format-dashboard-indicator-color/m-p/1223498#M48408</link>
      <description>&lt;P&gt;I am trying to conditionally format the text color of an indicator in a dashboard based on the selected slice of a pie chart. The indicator shows the sum of features and when a slice of the pie chart is selected, the indicator is filtered to only show the sum of features in that year. I have been able to make the color conditional on the count of features, but have been unable to make the color dependent on the selected year. My current code is below:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var c = $datapoint["count_x"]
var color = When(
    c == 1 ,'#A7C636',
    c == 3 ,'#149ECE', '#000000')

return {
    middleText: $datapoint["count_x"],
    middleTextColor: color,
    middleTextOutlineColor: '',
    middleTextMaxSize: 'large',
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My biggest issue is being unable to reference the feature itself, rather than the count of features. Attribute X is the year that I would like to sort by.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 18:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditionally-format-dashboard-indicator-color/m-p/1223498#M48408</guid>
      <dc:creator>ehuisman</dc:creator>
      <dc:date>2022-10-19T18:35:29Z</dc:date>
    </item>
  </channel>
</rss>

