<?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: Arcade in List (advanced formatting): filter unique values in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1391128#M9214</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/693532"&gt;@YvanS&lt;/a&gt;&amp;nbsp;Have you found a solution to this yet? I am trying to do the same thing&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 15:08:53 GMT</pubDate>
    <dc:creator>EdmundEkanem1</dc:creator>
    <dc:date>2024-03-05T15:08:53Z</dc:date>
    <item>
      <title>Arcade in List (advanced formatting): filter unique values</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1310003#M8124</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to filter data in a Dashboard &lt;STRONG&gt;List&lt;/STRONG&gt; element to display only unique attribute values.&lt;/P&gt;&lt;P&gt;The dataset looks something like this:&lt;/P&gt;&lt;TABLE border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="20"&gt;Site&lt;/TD&gt;&lt;TD width="64"&gt;Year&lt;/TD&gt;&lt;TD width="64"&gt;Species&lt;/TD&gt;&lt;TD width="64"&gt;Count&lt;/TD&gt;&lt;TD width="64"&gt;latitude&lt;/TD&gt;&lt;TD width="64"&gt;longitude&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S1&lt;/TD&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;124&lt;/TD&gt;&lt;TD&gt;83.27315&lt;/TD&gt;&lt;TD&gt;-100.353&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S1&lt;/TD&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;Sp2&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;83.27315&lt;/TD&gt;&lt;TD&gt;-100.353&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S1&lt;/TD&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;Sp2&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;83.27315&lt;/TD&gt;&lt;TD&gt;-100.353&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S1&lt;/TD&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;Sp3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;83.27315&lt;/TD&gt;&lt;TD&gt;-100.353&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S2&lt;/TD&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;86&lt;/TD&gt;&lt;TD&gt;63.27315&lt;/TD&gt;&lt;TD&gt;-100.359&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S2&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;63.27308&lt;/TD&gt;&lt;TD&gt;-100.359&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S3&lt;/TD&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;83.234&lt;/TD&gt;&lt;TD&gt;-100.675&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S3&lt;/TD&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;83.234&lt;/TD&gt;&lt;TD&gt;-100.675&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S3&lt;/TD&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;Sp4&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;83.234&lt;/TD&gt;&lt;TD&gt;-100.675&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;S4&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;Sp1&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;56.001&lt;/TD&gt;&lt;TD&gt;-112.675&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the &lt;STRONG&gt;List&lt;/STRONG&gt; element to only display unique &lt;EM&gt;Site&lt;/EM&gt; values (S1, S2, S3, S4). I need to keep the &lt;EM&gt;Year&lt;/EM&gt; and &lt;EM&gt;Species&lt;/EM&gt; attributes for &lt;STRONG&gt;Category Selector&lt;/STRONG&gt; filters (to decrease the list based on those selectors), so doing the filtering upstream in Data Expression won't work.&lt;/P&gt;&lt;P&gt;I'm thinking I need to use the &lt;STRONG&gt;Distinct&lt;/STRONG&gt; function but I'm not sure if:&lt;/P&gt;&lt;P&gt;1) this type of filtering is allowed at all in Advanced Formatting, and&lt;/P&gt;&lt;P&gt;2) how to call the values returned from the &lt;STRONG&gt;Distinct&lt;/STRONG&gt; function in List&amp;gt;List options&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="List.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/75856i91A84FC01D87E8B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="List.PNG" alt="List.PNG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;List.PNG&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Esri tutorials about Advanced Formatting for Lists are usually about visualizing data (not filtering it), and all the answers I can find in this forum on filtering unique/duplicate values relate to Data Expression.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 19:44:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1310003#M8124</guid>
      <dc:creator>YvanS</dc:creator>
      <dc:date>2023-07-20T19:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade in List (advanced formatting): filter unique values</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1350468#M8732</link>
      <description>&lt;P&gt;Someone replied to the same question on gis stack exchange (&lt;A href="https://gis.stackexchange.com/questions/464487/esri-dashboard-arcade-in-list-advanced-formatting-filter-unique-values/468207#468207" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/questions/464487/esri-dashboard-arcade-in-list-advanced-formatting-filter-unique-values/468207#468207&lt;/A&gt;) but their suggestion (below) did not fix the problem. &lt;SPAN class=""&gt;I still get a list of Site names with as many rows as the original dataset (i.e. not a list of unique Site names). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Advanced formatting:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var uniquename = Distinct($datapoint.Site);
return {
attributes: {
unique : uniquename
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Line item template:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{expression/unique}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 20:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1350468#M8732</guid>
      <dc:creator>YvanS</dc:creator>
      <dc:date>2023-11-16T20:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade in List (advanced formatting): filter unique values</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1391128#M9214</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/693532"&gt;@YvanS&lt;/a&gt;&amp;nbsp;Have you found a solution to this yet? I am trying to do the same thing&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1391128#M9214</guid>
      <dc:creator>EdmundEkanem1</dc:creator>
      <dc:date>2024-03-05T15:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade in List (advanced formatting): filter unique values</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1403906#M9337</link>
      <description>&lt;P&gt;Hi EdmundEkanem1,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I found a work-around that works for me but it's not really a solution to filtering unique values in a List.&lt;/P&gt;&lt;P&gt;My main problem was using Category Selectors to filter a List, based on information present in fields of the feature layer used to create the List.&lt;/P&gt;&lt;P&gt;The solution I found was to adapt the Category Selectors instead of adapting the List.&lt;/P&gt;&lt;P&gt;The Category Selectors used to get their categories from Grouped values (in option Data/Categories from). They now use:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Data: Categories from: Defined values (I had to manually type each different category); Value type: String&lt;/LI&gt;&lt;LI&gt;Selector: Operator: contains&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This works for me because the List summarizes information in its fields. For example, the field "Year" used in a Category Selector, has all the years for which there is data in my main dataset shown in the Dashboard map.The Category Selector then just checks if the Years field contains the Defined values (say "2011").&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99644i3002CD87B00162E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Untitled.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In my case, I have two distinct feature layers (the main dataset for the map, and the summarized dataset for the List). I created my summary file in R (because this is where I was working on the main dataset).&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 16:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-unique/m-p/1403906#M9337</guid>
      <dc:creator>YvanS</dc:creator>
      <dc:date>2024-04-01T16:14:37Z</dc:date>
    </item>
  </channel>
</rss>

