<?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 Label Expression python code to count repeating values in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179716#M1966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am facing challenges on python code to label the repeating numbers in attribute table. Please see below image&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/151533_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I want to use label expression to plot A(2), B(2),C(3) and D(1). Inside the bracket are count number. I will appreciate for the code, python prefer but can be vb script or anything else that works. THank you. And one more thing feature class sits in geodatabse and have to make connection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Dec 2015 02:14:53 GMT</pubDate>
    <dc:creator>pramodmishra</dc:creator>
    <dc:date>2015-12-04T02:14:53Z</dc:date>
    <item>
      <title>Label Expression python code to count repeating values</title>
      <link>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179716#M1966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am facing challenges on python code to label the repeating numbers in attribute table. Please see below image&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/151533_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I want to use label expression to plot A(2), B(2),C(3) and D(1). Inside the bracket are count number. I will appreciate for the code, python prefer but can be vb script or anything else that works. THank you. And one more thing feature class sits in geodatabse and have to make connection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 02:14:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179716#M1966</guid>
      <dc:creator>pramodmishra</dc:creator>
      <dc:date>2015-12-04T02:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression python code to count repeating values</title>
      <link>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179717#M1967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe that this is going to be easily possible within a label expression because it'd require that you scan the entire table to get the counts and then come back to the row where you needed to generate the label? I'd assume that you could probably add logic to the label expression, but this would probably only slow down the map rendering to the point it'd be unusable because you'd be crawling the entire feature class for each label rendered every time you refreshed the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be possible for you to add a field to your data where you could calculate this value and then you could label based on that field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 03:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179717#M1967</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-12-04T03:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression python code to count repeating values</title>
      <link>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179718#M1968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What type of feature class is this? Are you looking to just have one label per feature? You &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/dissolve.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/dissolve.htm"&gt;Dissolve—Data Management toolbox | ArcGIS for Desktop&lt;/A&gt; on the Letter ID field and use the statistics type 'COUNT' option parameter on the ID field. After you do the dissolve you can label it using an expression similar to this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Label]&amp;nbsp; +"("+ [COUNT_ID] +")"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="151795" class="image-1 jive-image" height="399" src="https://community.esri.com/legacyfs/online/151795_pastedImage_1.png" style="max-width: 1200px; max-height: 900px; height: 399px; width: 703.748px;" width="704" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 12:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/label-expression-python-code-to-count-repeating/m-p/179718#M1968</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2015-12-04T12:35:45Z</dc:date>
    </item>
  </channel>
</rss>

