Select to view content in your preferred language

Filtering Dashboard Elements Based on Table Relationship?

1392
2
09-15-2024 11:47 AM
Labels (1)
jgarcia_qk4
Occasional Contributor

Is it possible to set a dashboard element action to filter based on a table relationship? Here is an extremely simplified example what of what I am trying to do and the problem I am encountering:

Say I have 5 vehicular crash points. The only data associated with each point is a unique identifier and the coordinates:

jgarcia_qk4_0-1726424709694.png

I have another table which contains attribute data for persons involved in each crash, including the unique crash identifier.

jgarcia_qk4_1-1726424776193.png

I create a One to Many relationship class in ArcGIS Pro between the Crash Point layer and the Person Data layer, and then share as a feature layer. In ArcGIS online I can see that this relationship is honored:

jgarcia_qk4_2-1726424890278.png

However, when building a dashboard, I cannot filter the map of Crash Points by selecting an age from the chart because the Crash Points layer does not contain age Attributes.

jgarcia_qk4_4-1726425013753.png

 

jgarcia_qk4_3-1726424958773.png

Now I realize for this scenario I could do a One to Many join and export that, but the problem arises when I have 4 different tables all related to the original Crash Point layer and dozens of charts that all need to be filterable by each other, including situations where one chart needs to filter another that isn't the Crash Point layer. Joins just wont work. Arcade Data Expressions that can pull related records won't work either because I'm working with thousands of records.

Help me to understand, surely I must be doing something wrong here.

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

You're not doing anything wrong, but that kind of filtering across layers isn't usually possible in Dashboards without something like a Data Expression. In order to filter one widget from the other, they either need to share the same data source, or else the grouped field in your chart has to be present on the map.

I don't think having thousands of records is necessarily a dealbreaker on this, but you'd have to write the expression carefully to avoid performance issues. I'd recommend taking a look at "memorizing" the featuresets: https://codeberg.org/kendall-county-gis/arcade-expressions/src/branch/main/memorize.md

If you can push the entire layer to RAM first, a multi-layer looping expression will be able to execute much faster.

- Josh Carlson
Kendall County GIS
jgarcia_qk4
Occasional Contributor

Thanks for the response, I think for my purposes it would get prohibitively complicated to do it this way. At least this confirms it for me. Thanks for linking me to the code, may use it one day for something else.

0 Kudos