Using selectors to change displayed field on dashboard map.

1350
6
Jump to solution
07-22-2021 08:34 AM
bikeMapper312
New Contributor III

I have a map with essentially 6 different fields. X coordinate, Y coordinate, name, 2018, 2019, 2020. Each XY point corresponds to a vehicle counter that counts passing vehicles. Each year corresponds to the value for that given counter for that entire year. There are about 150 counters. 

Currently on my map in my dashboard, I am only displaying the 2020 data. I want to add some sort of button or selector on the header of the dashboard that lets you click each year and updates the map to that year. Any clue how to do this? I have a selector for Counter Location that has the address of the counter, but idk how to add actual fields as the selector button. 

This dashboard is a perfect example, with the "year" buttons on the header https://www.arcgis.com/apps/dashboards/9e2564aba06f4cbe88baa600b06188b1

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

You could have the indicator filter out the counters that are at 0 (or null, if that applies), then add an action to the year filter so that it also filters the indicator. That would cause the indicator to show the total counters for the selected year that are non-zero values.

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
6 Replies
jcarlson
MVP Esteemed Contributor

Unfortunately, the way your data is structured, it's not going to work like the example you linked to.

The reason that example works is because the data has a "Year" field and multiple years of data are represented by additional rows rather than columns.

jcarlson_0-1626970752320.png

Within a single indicator or chart, you can display multiple fields, but a category selector like that needs a single field to act on.

- Josh Carlson
Kendall County GIS
bikeMapper312
New Contributor III

Thanks for your reply! I see what you mean. I had a feeling that was the problem. Do you suggest a solution if I wanted to recreate that linked map? Based off that example table, it seems like I would need a field with each station location, but it would be a repeat row for each year? For example in the bike count explorer, wouldn't a single bike point location have multiple rows since it has multiple years? Like this table would be an example.

LocationYearCount Total
Smith St2017455
Smith St2018555
Smith St2019333
Smith St2020777

 

If i did this, wouldn't I have multiple points on top of one another on the map? Thanks

0 Kudos
bikeMapper312
New Contributor III

I guess I could just manually change my data table in excel and just copy and paste each location 5 different times for the years?

0 Kudos
jcarlson
MVP Esteemed Contributor

Yes, if you wanted to replicate that other example, you'd need to restructure your data in the way you show.

And yes, that would create overlapping points. As long as you don't give an "all / none" option to your category filter, however, the dashboard itself will only show one year at a time based on the selected category.

- Josh Carlson
Kendall County GIS
0 Kudos
bikeMapper312
New Contributor III

Great, thanks! It ended up working and i can filter by year. I do have one more question though.

I have an indicator that has "Total counters." Previously, it was a fixed number of 150 because it was counting the number of counters. But in reality, each year there are a different number of counters. 
For example, in 2017, we only had 68, now in 2021 we have 115. The bike count example updates the "total sites" by year.

How do you suppose I format my data so that I can show this? I have an example table of my data. It shows that for the first three years, the count was zero, aka, we didnt have a counter.

LocationYearCount
Smith Rd20170
Smith Rd20180
Smith Rd20190
Smith Rd2020456
Smith Rd2021566
0 Kudos
jcarlson
MVP Esteemed Contributor

You could have the indicator filter out the counters that are at 0 (or null, if that applies), then add an action to the year filter so that it also filters the indicator. That would cause the indicator to show the total counters for the selected year that are non-zero values.

- Josh Carlson
Kendall County GIS
0 Kudos