<?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: Label Expression to filter data by latest date in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320291#M13960</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be well off with my code. I'm no expert,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def FindLabel ( [CalcClass], [Date]):&lt;BR /&gt; def date(variable): &lt;BR /&gt; MaxDate = max([Date]) &lt;BR /&gt; if (variable in MaxDate): &lt;BR /&gt; return True&lt;BR /&gt; else: &lt;BR /&gt; return False&lt;BR /&gt; Calc = [CalcClass]&lt;BR /&gt; Filt = filter(MaxDate, Calc) &lt;BR /&gt; for s in Filt: &lt;BR /&gt; return Filt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from using google I'm getting todays date by using the Max() function and then returning all values which are todays date in the date field (I think) and then using those to filter my CalcClass field.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2020 13:28:19 GMT</pubDate>
    <dc:creator>MattWillcox</dc:creator>
    <dc:date>2020-06-25T13:28:19Z</dc:date>
    <item>
      <title>Label Expression to filter data by latest date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320289#M13958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write a python label expression which filters a column in my feature class so that its label shows a number from today's date. currently it labels every entry in the attribute table for the column in question. So for example if column A has a value of 1 and then changes to a value of 2 the next day I only want to show the value of 2. I can't seem to get a script which cracks it without issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 13:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320289#M13958</guid>
      <dc:creator>MattWillcox</dc:creator>
      <dc:date>2020-06-25T13:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression to filter data by latest date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320290#M13959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/Willcoxm14"&gt;Willcoxm14&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share what you have so far?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 13:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320290#M13959</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-06-25T13:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression to filter data by latest date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320291#M13960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be well off with my code. I'm no expert,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def FindLabel ( [CalcClass], [Date]):&lt;BR /&gt; def date(variable): &lt;BR /&gt; MaxDate = max([Date]) &lt;BR /&gt; if (variable in MaxDate): &lt;BR /&gt; return True&lt;BR /&gt; else: &lt;BR /&gt; return False&lt;BR /&gt; Calc = [CalcClass]&lt;BR /&gt; Filt = filter(MaxDate, Calc) &lt;BR /&gt; for s in Filt: &lt;BR /&gt; return Filt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from using google I'm getting todays date by using the Max() function and then returning all values which are todays date in the date field (I think) and then using those to filter my CalcClass field.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 13:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320291#M13960</guid>
      <dc:creator>MattWillcox</dc:creator>
      <dc:date>2020-06-25T13:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression to filter data by latest date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320292#M13961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/396518"&gt;Matt Willcox&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use the FindLabel function you provide two parameters. Those are the attributes of the current feature. If you want to get the maximum date from a set of feature, you will need to connect to the datasource in the script and extract the values to perform the analysis that you need. Doing this can have a mayor impact on performance, since for every feature it will loop through features of a datasource. If you have many features this is likely to become very slow.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 13:47:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320292#M13961</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-06-25T13:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression to filter data by latest date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320293#M13962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with &lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌ about performance.&amp;nbsp; For anything beyond a small to tiny data set, having a dynamic label based on a calculation over the whole data set will be slow at best.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 15:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-to-filter-data-by-latest-date/m-p/320293#M13962</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-06-25T15:17:11Z</dc:date>
    </item>
  </channel>
</rss>

