<?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 How to add the values of a column in CSV in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1219990#M45232</link>
    <description>&lt;P&gt;&lt;SPAN&gt;We have a .csv like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;product_name, price, city, market_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 2.5, London, L14&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 2.4, London, L22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 1.8, Berlin, B12&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rice, 6.1, Lisbon, LB3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We want to add all the values of the column price for the rows which fulfill a certain condition, e.g. product_name == "milk" and city == "London". In the previous example, that should be 4.9.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically we need to add the data for a column after the user has selected the &lt;/SPAN&gt;&lt;SPAN&gt;product_name&lt;/SPAN&gt;&lt;SPAN&gt; and the ' city' . What is the easiest way to achieve this? These are the options we've looked into:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pulldata() seems to only be useful to retrieve a single value from the .csv, but we need a collection of them and adding them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Select from file and search() are used to populate a choice list, but we have no interest in displaying the values individually to the user for them to select, we only want to automatically populate a field showing the total sum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A JS script seems like the next best option, but they are not able to access local files.&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2022 18:13:24 GMT</pubDate>
    <dc:creator>A0_Data</dc:creator>
    <dc:date>2022-10-07T18:13:24Z</dc:date>
    <item>
      <title>How to add the values of a column in CSV</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1219990#M45232</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We have a .csv like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;product_name, price, city, market_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 2.5, London, L14&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 2.4, London, L22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 1.8, Berlin, B12&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rice, 6.1, Lisbon, LB3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We want to add all the values of the column price for the rows which fulfill a certain condition, e.g. product_name == "milk" and city == "London". In the previous example, that should be 4.9.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically we need to add the data for a column after the user has selected the &lt;/SPAN&gt;&lt;SPAN&gt;product_name&lt;/SPAN&gt;&lt;SPAN&gt; and the ' city' . What is the easiest way to achieve this? These are the options we've looked into:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pulldata() seems to only be useful to retrieve a single value from the .csv, but we need a collection of them and adding them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Select from file and search() are used to populate a choice list, but we have no interest in displaying the values individually to the user for them to select, we only want to automatically populate a field showing the total sum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A JS script seems like the next best option, but they are not able to access local files.&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 18:13:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1219990#M45232</guid>
      <dc:creator>A0_Data</dc:creator>
      <dc:date>2022-10-07T18:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the values of a column in CSV</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1220679#M45255</link>
      <description>&lt;P&gt;I don't think there is a way to do exactly what you are trying to accomplish in Survey123.&amp;nbsp;&lt;SPAN&gt;I'm not sure how you're populating the csv but the easiest solution is probably&amp;nbsp;&lt;/SPAN&gt;doing the addition beforehand - is there a reason why you couldn't just have another csv list with columns for product name, city, total_price?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;product_name, total_price, city&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 4.9, London&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;milk, 1.8, Berlin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rice, 6.1, Lisbon&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 13:27:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1220679#M45255</guid>
      <dc:creator>AndyMcClary</dc:creator>
      <dc:date>2022-10-11T13:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the values of a column in CSV</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1221088#M45276</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;This should be relatively easy to complete if you combine &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-choice-filters/ba-p/894046" target="_self"&gt;choice filters&lt;/A&gt; with Pulldata.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Choice filter for city, then a conditional list with product_name, and finally pulldata to grab your price.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;Edit: Sorry, it's early. Didn't see the other requirement. I still think this could be possible, but I believe the issue is your test data in this case - the setup is quite confusing. Any chance we can see the real data set? Could really help.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 14:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-add-the-values-of-a-column-in-csv/m-p/1221088#M45276</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2022-10-12T14:23:09Z</dc:date>
    </item>
  </channel>
</rss>

