<?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: Combining Multiple Categories in a Serial Chart in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1147149#M5886</link>
    <description>&lt;P&gt;This worked great, thank you very much!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 19:07:06 GMT</pubDate>
    <dc:creator>DaveBodak</dc:creator>
    <dc:date>2022-02-23T19:07:06Z</dc:date>
    <item>
      <title>Combining Multiple Categories in a Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1146985#M5884</link>
      <description>&lt;P&gt;We are working on a hydrant inspection program to be integrated with AGOL. The program has two crew members in the same vehicle where they will go to inspect and service hydrants, with 8 crew members in total (so 4 groups). As a part of the hydrant inspection form, there are two fields for the inspectors; "Inspector 1" and "Inspector 2", one for each of them to show that they were the ones who took place in the inspection.&lt;/P&gt;&lt;P&gt;As a part of this, I am designing a dashboard to display all types of information on the program. One of the elements is a serial chart showing the number of hydrants that an inspector has been responsible for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaveBodak_0-1645629581965.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/34745i24AF4EA03034B5DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DaveBodak_0-1645629581965.png" alt="DaveBodak_0-1645629581965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The issue comes when attempting to combine this number for the two fields, this chart is only showing the inspections done by the "Inspector 1" field in this case. We are looking for a way to combine the "Inspector 1" and "Inspector 2" fields to count the number of times that an inspector is present in each field.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 15:26:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1146985#M5884</guid>
      <dc:creator>DaveBodak</dc:creator>
      <dc:date>2022-02-23T15:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple Categories in a Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1147065#M5885</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It sounds like you need a &lt;STRONG&gt;Data Expression&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;There are lots of ways to do this, but the simplest is to go through each record and add each attribute to a new FeatureSet as its own row.&lt;/P&gt;&lt;P&gt;If you want the chart to interact with other widgets, like filtering by date / hydrant / etc., it gets more complex, but here's the simple version:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal('https://www.arcgis.com');

// Inspections layer
var fs = FeatureSetByPortalItem(
    portal,
    'itemid',
    0, // or whatever layer index for the layer
    [
        'inspector_1',
        'inspector_2'
    ],
    false
);

// List of inspectors per field per feature; empty for now
var out_dict = {
    fields: [{name: 'inspector', type: 'esriFieldTypeString'}],
    geometryType: '',
    features: []
}

// Iterate over each feature in the layer
for (var f in fs){
    
    // Add inspector 1 to out_dict
    Push(
        out_dict['features'],
        {attributes: {inspector: f['inspector_1']}}
    )
    
    // Add inspector 2 to out_dic
    Push (
        out_dict['features'],
        {attributes: {inspector: f['inspector_2']}}
    )
}

// Return populated out_dict as FeatureSet
return FeatureSet(Text(out_dict))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1147065#M5885</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-02-23T17:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple Categories in a Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1147149#M5886</link>
      <description>&lt;P&gt;This worked great, thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 19:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1147149#M5886</guid>
      <dc:creator>DaveBodak</dc:creator>
      <dc:date>2022-02-23T19:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple Categories in a Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1501319#M9918</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt; , I am trying to do the same thing that &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/421559"&gt;@DaveBodak&lt;/a&gt; did a couple of years ago.&amp;nbsp; My task is to put data from four different fields into one:&amp;nbsp; Equipment1...Equipment4 --&amp;gt; Equipment so I can show proportional usage per feature using a pie chart in a Dashboard.&amp;nbsp; The Arcade code is attached, adapted from &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt; 's code above - my real portal address is different but all else should work.&amp;nbsp; If anyone can help me sort this out I'd be very grateful!!&amp;nbsp; Many thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 20:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1501319#M9918</guid>
      <dc:creator>D_AnneHammond</dc:creator>
      <dc:date>2024-07-03T20:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple Categories in a Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1624492#M11221</link>
      <description>&lt;P&gt;Hi Josh&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;- Your solution was very helpful. I would like my chart to interact with other widgets, as you mentioned, but once I've created the serial chart using "inspector" from the FeatureSet as the grouped values category field, I can no longer relate back to any of my other widgets' actions target fields. It seems that the only way to use a filter is to manipulate the original data so that the source field and target field have the same name. This defeats the purpose of using a data expression and can also not be used with data not owned. Do you have a workaround to please share that you allude to in your solution? Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 21:41:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-multiple-categories-in-a-serial-chart/m-p/1624492#M11221</guid>
      <dc:creator>KimberlyK</dc:creator>
      <dc:date>2025-06-17T21:41:21Z</dc:date>
    </item>
  </channel>
</rss>

