<?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 Series Group Value chart - Data Expression in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1261123#M7388</link>
    <description>&lt;P&gt;Easy enough! Just include the date field in the groupby function, and that should make it available as your category field.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2023 21:13:53 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2023-02-23T21:13:53Z</dc:date>
    <item>
      <title>Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260683#M7373</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if this type of chart was possible using data expressions in Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonovanC_0-1677103278856.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63458i69AA6D8C8A64C5E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonovanC_0-1677103278856.png" alt="DonovanC_0-1677103278856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 22:04:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260683#M7373</guid>
      <dc:creator>DonovanC</dc:creator>
      <dc:date>2023-02-22T22:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260694#M7374</link>
      <description>&lt;P&gt;In general, yes. Data Expressions are really only limited by how complex an expression you want to write and how long you're willing to wait for it to execute.&lt;/P&gt;&lt;P&gt;What does the data look like, though? I don't see anything about the chart you've posted that wouldn't be doable in the out-of-the-box options. If Compliance is a field in the table, you probably don't need a Data Expression for this.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 22:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260694#M7374</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-02-22T22:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260698#M7375</link>
      <description>&lt;P&gt;I've attached the survey123 and the schema of the data. In the form users select Satisfactory, Non-Satisfactory or N/A for four sections. The chart I posted came from an excel sheet that the business group is hoping I could replicate using dashboards. I've experimented with the out of the box solution and could not achieve the same results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Donovan&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 22:42:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260698#M7375</guid>
      <dc:creator>DonovanC</dc:creator>
      <dc:date>2023-02-22T22:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260710#M7376</link>
      <description>&lt;P&gt;I see, so you're merging the responses from four fields. Yes, a Data Expression would be needed for this. Whenever possible, using a function like &lt;STRONG&gt;GroupBy&lt;/STRONG&gt; will perform &lt;EM&gt;much &lt;/EM&gt;faster than a for loop, since the server will be doing all the heavy lifting.&lt;/P&gt;&lt;P&gt;Here's an idea you could try. By using SQL, you can do a CASE WHEN ... THEN ... END block to convert your compliance fields to numeric values and then sum them across the 4 fields.&lt;/P&gt;&lt;P&gt;The output of an expression like this would be the same number of rows as the input, but with 3 numeric fields representing the number of compliance items matching a particular option. This could then be graphed out.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// get the featureset
var fs = FeatureSetByPortalItem(
    Portal('your portal url'),
    'itemid of service',
    0, // or the layer index of your desired layer, if not 0
    ['objectid', 'required_controls', 'excavation', 'cohe', 'third_party_utilities'],
    false
)

// define grouping SQL

var sat_sql = `
CASE WHEN required_controls == 'S' THEN 1 ELSE 0 END +
CASE WHEN excavation == 'S' THEN 1 ELSE 0 END +
CASE WHEN cohe == 'S' THEN 1 ELSE 0 END +
CASE WHEN 'third_party_utilities' == 'S' THEN 1 ELSE 0 END`

var nonsat_sql = `
CASE WHEN required_controls == 'NS' THEN 1 ELSE 0 END +
CASE WHEN excavation == 'NS' THEN 1 ELSE 0 END +
CASE WHEN cohe == 'NS' THEN 1 ELSE 0 END +
CASE WHEN 'third_party_utilities' == 'NS' THEN 1 ELSE 0 END`

var na_sql = `
CASE WHEN required_controls == 'N/A' THEN 1 ELSE 0 END +
CASE WHEN excavation == 'N/A' THEN 1 ELSE 0 END +
CASE WHEN cohe == 'N/A' THEN 1 ELSE 0 END +
CASE WHEN 'third_party_utilities' == 'N/A' THEN 1 ELSE 0 END`

// "group" your data by objectid, using SQL expressions to calculate new fields
return GroupBy(
    fs,
    'objectid',
    [
        {name: 'sat', expression: sat_sql, statistic: 'SUM'},
        {name: 'nonsat', expression: nonsat_sql, statistic: 'SUM'},
        {name: 'na', expression: na_sql, statistic: 'SUM'}
    ]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 23:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1260710#M7376</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-02-22T23:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1261010#M7385</link>
      <description>&lt;P&gt;Thanks Josh this worked great, the data expression is awesome and has given me some ideas. But I'm guessing its a limitation with charts in dashboards I was hoping to have multi series grouped value chart using the date as a category field or would that be a totally different expression?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonovanC_0-1677172252067.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63541i13D327E5C6E3EA5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonovanC_0-1677172252067.png" alt="DonovanC_0-1677172252067.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 17:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1261010#M7385</guid>
      <dc:creator>DonovanC</dc:creator>
      <dc:date>2023-02-23T17:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1261123#M7388</link>
      <description>&lt;P&gt;Easy enough! Just include the date field in the groupby function, and that should make it available as your category field.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 21:13:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1261123#M7388</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-02-23T21:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1262001#M7403</link>
      <description>&lt;P&gt;Hi Josh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked perfectly as well. I'm not sure if its a limitation with the chart capabilities in Dashboards but can a Grouped Value chart display multiple series while using the date as a category.&amp;nbsp; I found when use the Features chart it ends up looking like this. Instead of showing each feature I would like to see the totals per month&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonovanC_0-1677508908547.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63762iDAE736FD59AA76DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonovanC_0-1677508908547.png" alt="DonovanC_0-1677508908547.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 14:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1262001#M7403</guid>
      <dc:creator>DonovanC</dc:creator>
      <dc:date>2023-02-27T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Series Group Value chart - Data Expression</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1573311#M10627</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Josh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help on this but now Im looking to expand on the data expression and have the ability to use a Category Selector to help filter the data, in the selector there is no target field. I've looked at some other posts and tried to accomplish it and could not. I was hoping you could steer me in the right direction&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 20:37:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/multiple-series-group-value-chart-data-expression/m-p/1573311#M10627</guid>
      <dc:creator>DonovanC</dc:creator>
      <dc:date>2025-01-07T20:37:36Z</dc:date>
    </item>
  </channel>
</rss>

