<?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: Trying to create an Indicator with a data expression to sum values and apply calculations in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355397#M8814</link>
    <description>&lt;P&gt;The quotes you're using aren't the standard ' or ". Replace those and it should run properly.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var out_fs = { geometryType: '', fields: [ {name: 'Value', type: 'esriFieldTypeDouble'}, ], features: [] }

var v1 = $datapoint['TOTAL_MKT_VALUE']
var v2 = $datapoint['NEAR_DIST_WATER'] * 200
var v3 = $datapoint['NEAR_DIST_SEWER'] * 100
var v = v1 + v2 + v3; 
Push(out_fs.features, {attributes: {Value: v}})
return FeatureSet(Text(out_fs))&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 30 Nov 2023 21:09:19 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-11-30T21:09:19Z</dc:date>
    <item>
      <title>Trying to create an Indicator with a data expression to sum values and apply calculations</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355364#M8806</link>
      <description>&lt;P&gt;I am trying to sum three fields (TOTAL_MKT_VALUE, NEAR_DIST_WATER, NEAR_DIST_SEWER), while applying a factor value to the last two fields, into a new Indicator, but I get an error message "&lt;SPAN&gt;Invalid variable assignment". The three fields are all of Double Precision type. Can anyone please help me figure out what is wrong with this expression (below)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var out_fs = { geometryType: “”, fields: [ {name: “Value”, type: “esriFieldTypeDouble”}, ], features: [] }&lt;/P&gt;&lt;P&gt;var v1 = $datapoint[‘TOTAL_MKT_VALUE’]&lt;/P&gt;&lt;P&gt;var v2 = $datapoint[‘NEAR_DIST_WATER’] * 200&lt;/P&gt;&lt;P&gt;var v3 = $datapoint[‘NEAR_DIST_SEWER’] * 100&lt;/P&gt;&lt;P&gt;var v = v1 + v2 + v3 Push(out_fs.features, {attributes: {Value: v}})&lt;/P&gt;&lt;P&gt;return FeatureSet(Text(out_fs))&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 20:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355364#M8806</guid>
      <dc:creator>BarryG</dc:creator>
      <dc:date>2023-11-30T20:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create an Indicator with a data expression to sum values and apply calculations</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355397#M8814</link>
      <description>&lt;P&gt;The quotes you're using aren't the standard ' or ". Replace those and it should run properly.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var out_fs = { geometryType: '', fields: [ {name: 'Value', type: 'esriFieldTypeDouble'}, ], features: [] }

var v1 = $datapoint['TOTAL_MKT_VALUE']
var v2 = $datapoint['NEAR_DIST_WATER'] * 200
var v3 = $datapoint['NEAR_DIST_SEWER'] * 100
var v = v1 + v2 + v3; 
Push(out_fs.features, {attributes: {Value: v}})
return FeatureSet(Text(out_fs))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Nov 2023 21:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355397#M8814</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-11-30T21:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create an Indicator with a data expression to sum values and apply calculations</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355422#M8815</link>
      <description>&lt;P&gt;Thank you Ken. I found out the problem is that my layer is a map image layer, and the Arcade script only works for Feature service layers&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 21:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-create-an-indicator-with-a-data/m-p/1355422#M8815</guid>
      <dc:creator>BarryG</dc:creator>
      <dc:date>2023-12-01T21:20:53Z</dc:date>
    </item>
  </channel>
</rss>

