<?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: Multiple Choice Survey Question into Serial Chart in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1374596#M8987</link>
    <description>&lt;P&gt;I was able to create something that works really well after combining a few community posts if anyone comes across this in the future. This counts the number of times a multiple choice option was selected, and also renames the label to match what it was labeled as in Survey123.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This uses the Grouped Value option in Dashboard where the Category is set to the 'split_choices' field from the 'new' featureSet, then the Statistic is set to 'Sum' the 'split_count' field.&lt;/LI&gt;&lt;LI&gt;The main step to get the relabeling to work is wrapping the "Trim" function in the 'decode_dict' to translate the values&lt;/LI&gt;&lt;LI&gt;Be sure to add the decoded values as Categories in the dashboard Series tab, not the original labels.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Reference layer using the FeatureSetByPortalItem() method. 
var portal = Portal('https://www.arcgis.com') 
var fs = FeatureSetByPortalItem( 
    portal, 
    '&amp;lt;ID#&amp;gt;', 
    0, 
    ['&amp;lt;fieldnames&amp;gt;'], 
    false 
); 

// Create empty array for features and feat object 
var features = []; 
var feat; 
//give the codes a new label to match what was entered in the survey
var decode_dict = { 
  "Local":"Born Here", 
  "Indigenous":"Native, Indigenous, or Aboriginal", 
  "Conflict":"Fleeing War, Tension, Persecution, Poverty; Seeking Refuge", 
  "Forced":"Slavery, Human Trafficking, Criminal Relocation", 
  "Career":"Opportunity - Employment or Education", 
  "Family":"Adoption, Marriage, or Reunification", 
  "Health":"Medical, Health, Environment, or Wellness", 
  "Colonization":"Colonization" 
} 

// Split comma separated types and store in dictionary.   
for (var feature in fs) {  
    var split_array  =  Split(feature["&amp;lt;fieldname&amp;gt;"], ',')  
    var count_arr = Count(split_array)  
    for(var i = 0; i &amp;lt; count_arr; i++ ){  
        feat = { 
            'attributes': { 
                'split_choices': decode_dict[Trim(split_array[i])] 
            } 
        } 
        Push(features, feat); 
}} 

// Empty dictionary to capture each hazard reported as separate rows.  
var choicesDict = { 
    'fields': [ 
        { 'name': 'split_choices', 'type': 'esriFieldTypeString'}],  
    'geometryType': '', 
    'features': features 
};  

// Convert dictionary to featureSet.  
var fs_dict = FeatureSet(choicesDict); 

// Return featureset after grouping by hazard types.  
return GroupBy(fs_dict, ['split_choices'],  
       [{ name: 'split_count', expression: 'split_choices', statistic: 'COUNT' }]);  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2024 19:12:57 GMT</pubDate>
    <dc:creator>Teresa_Blader</dc:creator>
    <dc:date>2024-01-25T19:12:57Z</dc:date>
    <item>
      <title>Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1087119#M4923</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to put data from a survey question into a dashboard via a serial chart, however the question I want to insert is multiple choice. When I view the data in the survey itself you can see it displayed correctly (how I want it to look in the dashboard) however, when I put it in the dashboard it creates a separate "bar" for anyone who selected more than one choice. Is there a way I can combine the bars so it displays like in the survey?&lt;/P&gt;&lt;P&gt;Also, is there a way to rename the fields in a serial chart to get rid of the underscores?&lt;/P&gt;&lt;P&gt;Thanks. Pictures attached for reference.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 15:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1087119#M4923</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-08-09T15:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1087147#M4925</link>
      <description>&lt;P&gt;The dashboard chart isn't parsing the comma-separated values like the survey page, and does not have access to the labels of each value in the list.&lt;/P&gt;&lt;P&gt;The only way to get the dashboard to look like the survey page will be to use a &lt;A href="https://doc.arcgis.com/en/dashboards/get-started/create-data-expressions.htm" target="_blank" rel="noopener"&gt;Data Expression&lt;/A&gt;. The &lt;A href="https://links.esri.com/dashboards-help/sample-data-expressions" target="_blank" rel="noopener"&gt;example expressions&lt;/A&gt; are particularly helpful. In fact, &lt;A href="https://github.com/Esri/arcade-expressions/blob/master/dashboard_data/SplitCategories(PieChart).md" target="_self"&gt;one of the expressions&lt;/A&gt; is already made with this kind of situation in mind. Though it produces a pie chart, the concept could as easily be used for a serial chart as well.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 15:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1087147#M4925</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-08-09T15:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1207421#M6749</link>
      <description>&lt;P&gt;When you configure your chart based on a data expression, how do you configure actions based on that chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. I have a serial chart that uses a data expression, I want users to be able to select a bar from the chart and filter the other items in the dashboard.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 21:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1207421#M6749</guid>
      <dc:creator>AustinCanty1</dc:creator>
      <dc:date>2022-08-29T21:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1255334#M7311</link>
      <description>&lt;P&gt;Austin,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Were you able to figure out how to configure actions based of selection within chart?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 15:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1255334#M7311</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-02-06T15:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1374596#M8987</link>
      <description>&lt;P&gt;I was able to create something that works really well after combining a few community posts if anyone comes across this in the future. This counts the number of times a multiple choice option was selected, and also renames the label to match what it was labeled as in Survey123.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This uses the Grouped Value option in Dashboard where the Category is set to the 'split_choices' field from the 'new' featureSet, then the Statistic is set to 'Sum' the 'split_count' field.&lt;/LI&gt;&lt;LI&gt;The main step to get the relabeling to work is wrapping the "Trim" function in the 'decode_dict' to translate the values&lt;/LI&gt;&lt;LI&gt;Be sure to add the decoded values as Categories in the dashboard Series tab, not the original labels.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Reference layer using the FeatureSetByPortalItem() method. 
var portal = Portal('https://www.arcgis.com') 
var fs = FeatureSetByPortalItem( 
    portal, 
    '&amp;lt;ID#&amp;gt;', 
    0, 
    ['&amp;lt;fieldnames&amp;gt;'], 
    false 
); 

// Create empty array for features and feat object 
var features = []; 
var feat; 
//give the codes a new label to match what was entered in the survey
var decode_dict = { 
  "Local":"Born Here", 
  "Indigenous":"Native, Indigenous, or Aboriginal", 
  "Conflict":"Fleeing War, Tension, Persecution, Poverty; Seeking Refuge", 
  "Forced":"Slavery, Human Trafficking, Criminal Relocation", 
  "Career":"Opportunity - Employment or Education", 
  "Family":"Adoption, Marriage, or Reunification", 
  "Health":"Medical, Health, Environment, or Wellness", 
  "Colonization":"Colonization" 
} 

// Split comma separated types and store in dictionary.   
for (var feature in fs) {  
    var split_array  =  Split(feature["&amp;lt;fieldname&amp;gt;"], ',')  
    var count_arr = Count(split_array)  
    for(var i = 0; i &amp;lt; count_arr; i++ ){  
        feat = { 
            'attributes': { 
                'split_choices': decode_dict[Trim(split_array[i])] 
            } 
        } 
        Push(features, feat); 
}} 

// Empty dictionary to capture each hazard reported as separate rows.  
var choicesDict = { 
    'fields': [ 
        { 'name': 'split_choices', 'type': 'esriFieldTypeString'}],  
    'geometryType': '', 
    'features': features 
};  

// Convert dictionary to featureSet.  
var fs_dict = FeatureSet(choicesDict); 

// Return featureset after grouping by hazard types.  
return GroupBy(fs_dict, ['split_choices'],  
       [{ name: 'split_count', expression: 'split_choices', statistic: 'COUNT' }]);  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 19:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1374596#M8987</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2024-01-25T19:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Choice Survey Question into Serial Chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1652475#M11445</link>
      <description>&lt;P&gt;Worked great!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 15:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-choice-survey-question-into-serial-chart/m-p/1652475#M11445</guid>
      <dc:creator>EricAnderson_DHS</dc:creator>
      <dc:date>2025-09-23T15:18:04Z</dc:date>
    </item>
  </channel>
</rss>

