<?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: Elements to read/display data from the 4 most recent years in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354278#M8780</link>
    <description>&lt;P&gt;You can filter your records to return only the ones from the last four years like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(
    Portal('your portal'), 
    'your item id', 
    0
);
var filterDate = Text(DateAdd(Today(), -4, 'years'), 'YYYY-MM-DD');
var filteredData = Filter(fs, "datefield &amp;gt; @filterDate");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 19:47:22 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-11-28T19:47:22Z</dc:date>
    <item>
      <title>Elements to read/display data from the 4 most recent years</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354254#M8778</link>
      <description>&lt;P&gt;I am working on a dashboard with 3 indicators, 1 pie chart and 1 bar graph. I need each of these elements to only read data from the 4 most recent years so that the data they are displaying is constantly updated as more data is compiled. Is there a way to create a data expression or even filter data so it does this automatically or will I have to manually update the elements each time to only display data from a certain time period? A data expression for each indicator to automate this would be ideal.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 19:08:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354254#M8778</guid>
      <dc:creator>Jabousaw</dc:creator>
      <dc:date>2023-11-28T19:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Elements to read/display data from the 4 most recent years</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354274#M8779</link>
      <description>&lt;P&gt;I don't know that you need a Data Expression at all. Any given widget lets you apply filters like "some date field is within the last 4 years". Does that not work?&lt;/P&gt;&lt;P&gt;You could still do it with a Data Expression and hard-code a Filter using the &lt;STRONG&gt;Now&lt;/STRONG&gt; function to always have it relative to the current date, thus avoiding having to edit the expression in the future. But check out the built-in filter options first.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 19:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354274#M8779</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-11-28T19:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Elements to read/display data from the 4 most recent years</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354278#M8780</link>
      <description>&lt;P&gt;You can filter your records to return only the ones from the last four years like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(
    Portal('your portal'), 
    'your item id', 
    0
);
var filterDate = Text(DateAdd(Today(), -4, 'years'), 'YYYY-MM-DD');
var filteredData = Filter(fs, "datefield &amp;gt; @filterDate");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 19:47:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/elements-to-read-display-data-from-the-4-most/m-p/1354278#M8780</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-11-28T19:47:22Z</dc:date>
    </item>
  </channel>
</rss>

