Dynamic Content - adding sums

05-16-2022 06:55 AM
Labels (1)
New Contributor

I'm using Dynamic Content - Expression to summate two fields with distances in metres and convert to km and display the distances in Text widgets:

Text 1:      SUM({Dist1})/1000

Text 2:      SUM({Dist2})/1000

These two work OK.

I then try to add the two together:

Text 3:      SUM({Dist1})/1000+SUM({Dist2}]/1000

This won't work - I just get the name I gave the expression, both on the build view and when I run it. I don't get the "invalid expression" message in the expression builder or any other errors. How can I add together the two summations?

4 Replies
Occasional Contributor

Hi Tim,

No solution here, just a show of support.  I have experienced this issue as well and would be interested in any work arounds or updates.  The expression tools are currently a bit limited so I look forward to the Experience Builder  team digging into this and expending its use.  They've created a really great toolkit that has an immense amount of potential as it develops.


Kevin Wright
Data Visualization Enthusiast
Esri Regular Contributor

Hi @TimBarlow 

I tried a similar expression and it worked.

Can you check if you are using the default view in the expression, since the selected feature view is used by default.





0 Kudos
New Contributor

Hi Shengdi

Yes, I'm using the default view for this.

I also have another problem now - the ones that worked e.g.

Text 1:      SUM({Dist1})/1000

This works with the default view. However if I create a new view to filter the data before summation (inc_file is y) then it no longer works. There is data after filtering, which I can see in the table when I create the view.





0 Kudos
Esri Regular Contributor

Hi, I cannot reproduce this issue either, can you share a sample app with me? My username is she10946.

0 Kudos