<?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: Dashboard Beta - Sum of time differences in Indicator in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-beta-sum-of-time-differences-in/m-p/1623976#M11211</link>
    <description>&lt;P&gt;Hello, am trying to do the same thing, but I was not successfull&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jun 2025 18:35:55 GMT</pubDate>
    <dc:creator>pnmapas</dc:creator>
    <dc:date>2025-06-16T18:35:55Z</dc:date>
    <item>
      <title>Dashboard Beta - Sum of time differences in Indicator</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-beta-sum-of-time-differences-in/m-p/1037257#M4254</link>
      <description>&lt;P&gt;I've have some simple polyline features (routes with a StartTime and EndTime both in correct datetime formats).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a Web Map I can create a popup/field with an arcade dateDiff() expression to calculate the travel time in hours for each feature.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;dateDiff($datapoint["EndTime"], $datapoint["StartTime"], 'hours')&lt;/LI-CODE&gt;&lt;P&gt;Within an ArcGIS Online dashboard (beta) I would like to add an indicator which shows the sum of all the travel times.&amp;nbsp; e.g. if I had 3 features with an arcade popup calculated travel time of 1,2 and 5 hours - The indicator would show the sum of these (Total Hours - 8).&lt;/P&gt;&lt;P&gt;It appears that I can't reference the popup travel time field within the dashboard (also according to this -&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-beta-documents/arcade-in-arcgis-dashboards-beta/ta-p/921173" target="_blank"&gt;Arcade in ArcGIS Dashboards Beta - Esri Community&lt;/A&gt;) to do a simple SUM on that field.&lt;/P&gt;&lt;P&gt;The next thought was to use an arcade expression in the indicator, but that only allows me to recreate the popup expression.&amp;nbsp; I tried to run a for loop within the expression, but I'm sure I cant create a global variable to hold any values, and therefore the expression is just run on a per-row basis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var total_time = ''
for (var f in dateDiff($datapoint["EndTime"], $datapoint["StartTime"], 'hours') ){
    total_time += f
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcade_betadboard_issue.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8612i46ACBB5080552340/image-size/large?v=v2&amp;amp;px=999" role="button" title="arcade_betadboard_issue.png" alt="arcade_betadboard_issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 18:56:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-beta-sum-of-time-differences-in/m-p/1037257#M4254</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-03-16T18:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Beta - Sum of time differences in Indicator</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-beta-sum-of-time-differences-in/m-p/1623976#M11211</link>
      <description>&lt;P&gt;Hello, am trying to do the same thing, but I was not successfull&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 18:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-beta-sum-of-time-differences-in/m-p/1623976#M11211</guid>
      <dc:creator>pnmapas</dc:creator>
      <dc:date>2025-06-16T18:35:55Z</dc:date>
    </item>
  </channel>
</rss>

