<?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: Percentage Calculation giving error in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096230#M37019</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Contract_Day is a date? dividing a date isn't going to go well in any language expression&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 04:00:51 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-09-08T04:00:51Z</dc:date>
    <item>
      <title>Percentage Calculation giving error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096218#M37017</link>
      <description>&lt;P&gt;I am currently the hunt for a solution to a very frustrating problem. I have a field that needs to simply divide two fields and return a percentage. Below are the screenshots of my calculations and fields. I need to divide Contract_Day by Total_Num_Contract and make sure to return a percentage sign. Third screenshot is the output.&amp;nbsp;&lt;/P&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="JohnnyHarley232_0-1631069010639.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22575iD408F26C4211AB31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnnyHarley232_0-1631069010639.png" alt="JohnnyHarley232_0-1631069010639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnnyHarley232_1-1631069040789.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22576i56B59A6F0818D3A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnnyHarley232_1-1631069040789.png" alt="JohnnyHarley232_1-1631069040789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnnyHarley232_2-1631069102483.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22577i33E0908E33F379A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnnyHarley232_2-1631069102483.png" alt="JohnnyHarley232_2-1631069102483.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 02:45:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096218#M37017</guid>
      <dc:creator>JohnnyHarley232</dc:creator>
      <dc:date>2021-09-08T02:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Calculation giving error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096230#M37019</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Contract_Day is a date? dividing a date isn't going to go well in any language expression&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 04:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096230#M37019</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-09-08T04:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Calculation giving error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096237#M37021</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/457731"&gt;@JohnnyHarley232&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;points out you can not divide a date field by an integer and get the value you are wanting of percentage of days. Did you mean you want to divide by Num_Contract_Days by total_num_contract and convert to percent? That should be possible as both are integer values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share your XLSForm (xlsx file and any media folder files) so we can take a look at how you have configured the rest your calculations and the data types?&lt;/P&gt;&lt;P&gt;Also note your current calculation will not work, you are trying to do maths expressions and concatenate strings in the same calculation. You need to split this out into two seperate calculations (you can make them hidden). So that you calculate your final value, just a integer or decimal. And then in next calculation you can concatenate the integer and string together to get the text represenation you are after.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 04:41:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/percentage-calculation-giving-error/m-p/1096237#M37021</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-09-08T04:41:47Z</dc:date>
    </item>
  </channel>
</rss>

