Select to view content in your preferred language

Expression with multiple data views

561
1
11-17-2022 02:27 PM
Labels (2)
wrumley_asheville
New Contributor

Hey everyone. I'm trying to build an expression in a Text widget between different views of the same data because a WHERE clause isn't available). Based on the solution of this post, it looks like it was once possible to change the data view source for the individual expression elements, however I don't seem to have this functionality. Does any know if this functionality was removed or could guide me to towards what I'm trying to do? I'd like to do something like the following to get a percentage.

COUNT(DataSource2)/COUNT(DataSource1)

Where DataSource2 is a data view containing only roads that have been treated and DataSource1 is the full dataset of roads. This will give us a percentage of treated roads. 

Thanks!

 

0 Kudos
1 Reply
DanJiang
Esri Contributor

Hi @wrumley_asheville, please add multiple data sources to the Text widget and switch to the Expression tab in the Dynamic content popper. Since the count function supports counting unique values, please type in "{}" in the count function, so the data source selector is available. Please choose the data source and the field to be counted(use the objectid if you want to count the number of records).  Hope this message is helpful. 

DanJiang_0-1669017374328.png