<?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 Re: Advanced Formatting: Using the Filter function to return population values from identified counties in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496680#M9850</link>
    <description>&lt;P&gt;This has a few problem. SQL is picky about quotes, so you'll have to encase the entire thing in double quotes and use single quotes for each item. You have to use a single = sign. And you have to use "or" not "||"&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var filtered_pop = Filter($datapoint.sum_SUM_Population, 
    "Name = 'Shelby County' or Name = 'Tipton County' or ..." &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However, by using "in", you can make this much easier to read and much shorter.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var filtered_pop = Filter($datapoint.sum_SUM_Population, 
    "Name in ('Shelby County', 'Tipton County', ...)" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2024 14:51:50 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-06-24T14:51:50Z</dc:date>
    <item>
      <title>Advanced Formatting: Using the Filter function to return population values from identified counties</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496660#M9849</link>
      <description>&lt;P&gt;I am trying to return a sum value of filtered population counts from counties noted in my filter function. I am having issues getting it to display in an indicator widget. See anything I am doing wrong with my code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var filtered_pop = Filter($datapoint.sum_SUM_Population, 
    'Name == "Shelby County" || Name == "Tipton County" || Name == "Lauderdale County" || Name == "Dyer County" || Name == "Lake County" || Name == "Obion County" || Name == "Weakley County" || Name == "Gibson County" || Name == "Crockett County" || Name == "Haywood County" || Name == "Fayette County"')


return {
  //textColor:'',
  //backgroundColor:'',
  topText: 'Total Population',
  //topTextColor: '',
  //topTextOutlineColor: '',
  topTextMaxSize: 'medium',
  middleText: filtered_pop,
  middleTextColor: '',
  middleTextOutlineColor: '',
  middleTextMaxSize: 'large',
  bottomText: '(counties experiencing at least very strong shaking)',
  //bottomTextColor: '',
  //bottomTextOutlineColor: '',
  //bottomTextMaxSize: 'medium',
  //iconName:'',
  //iconAlign:'left',
  //iconColor:'',
  //iconOutlineColor:'',
  //noValue:false,
  //attributes: {
    // attribute1: '',
    // attribute2: ''
  // }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1719239288302.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107780iEB660D3DE3A56FC2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1719239288302.png" alt="dwold_0-1719239288302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 14:29:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496660#M9849</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-06-24T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Formatting: Using the Filter function to return population values from identified counties</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496680#M9850</link>
      <description>&lt;P&gt;This has a few problem. SQL is picky about quotes, so you'll have to encase the entire thing in double quotes and use single quotes for each item. You have to use a single = sign. And you have to use "or" not "||"&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var filtered_pop = Filter($datapoint.sum_SUM_Population, 
    "Name = 'Shelby County' or Name = 'Tipton County' or ..." &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However, by using "in", you can make this much easier to read and much shorter.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var filtered_pop = Filter($datapoint.sum_SUM_Population, 
    "Name in ('Shelby County', 'Tipton County', ...)" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 14:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496680#M9850</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-06-24T14:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Formatting: Using the Filter function to return population values from identified counties</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496694#M9851</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 15:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/advanced-formatting-using-the-filter-function-to/m-p/1496694#M9851</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-06-24T15:19:36Z</dc:date>
    </item>
  </channel>
</rss>

