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
Solved! Go to Solution.
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.
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.
Within a single indicator or chart, you can display multiple fields, but a category selector like that needs a single field to act on.
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.
Location | Year | Count Total |
Smith St | 2017 | 455 |
Smith St | 2018 | 555 |
Smith St | 2019 | 333 |
Smith St | 2020 | 777 |
If i did this, wouldn't I have multiple points on top of one another on the map? Thanks
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?
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.
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.
Location | Year | Count |
Smith Rd | 2017 | 0 |
Smith Rd | 2018 | 0 |
Smith Rd | 2019 | 0 |
Smith Rd | 2020 | 456 |
Smith Rd | 2021 | 566 |
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.