Category Selectors provide your users with a straightforward way to filter and interact with your dashboard. While they are frequently used, I think there are a lot of “hidden” capabilities not everyone is aware of.
You can use one Category Selector to filter another Category Selector. This is helpful when you have a long list of options. Instead of forcing your user to dig through all these options, you can allow them to first filter it down to a specific category of options. One of the most common examples is to use a state Category Selector to filter a county Category Selector.
Different state selections provide different county options.
A pretty popular workflow is to use Dashboards to display data collected in Survey123. One issue that frequently trips folks up with this workflow is the use of Select Multiple questions. The results of these questions are stored as a comma separated list of selected options. This makes filtering tricky for two reasons. The first is that the filter list is a list of all the different selection combinations in your data and not a nice list showing only the possible options. The second issue is that when a user selects a choice combination, the dashboard filters the records to show only records that have that EXACT SAME choice combination.
Select Multiple filtering shenanigans
Filtering by food_trucks, doesn't show us all the records that choose the food_truck option. It shows all the records that ONLY choose the food_truck option.
To get the functionality I want, I will need to set up the Category Selector using Defined values.
The Value field should be the choice name, while the Display name can be a nicely formatted label.
Only add the individual choice options.
Then in the Selector tab, ensure that you are using contains as the Operator.
This is where the magic happens!
No more Select Multiple Category Selector woes.
Now the Food Truck filter displays any record where Food Trucks was selected.
For more tips about dealing with the results of a Select Multiple question in dashboards, check out Dashboards That Pop: Select Multiple Clean-Up.
Probably not really hidden, but definitely misunderstood. This is a handy setting that I use 95% of the time. However, I have noticed that there can be some confusion about what exactly ‘None’ means. Is it none as in data: none or filters: none?
To get a better understanding of the none option, let’s first examine the default behavior of dashboards and Category Selectors. When you build a dashboard, the default behavior is for it to display all of the data that you have added to your dashboard.
Dashboard showing data across the United States
When you add a Category Selector to a dashboard (without the none option selected), the default behavior is to select the first category option and filter out anything that is not that category.
Now that dashboard open to only show Alabama data.
Category Selectors work by removing data that does not match the filter. They do not add data that matches the filter.
When you add the none option, you are allowing users to have a no filters applied (filters: none) option.
Dashboard opens to display all US data but users can optionally filter to a specific state.
💡 I always change the label for none to ‘All’ so that there is no confusion for my end users.
Label for none
If you really want your map or elements to display no data until a filter is selected, you can add the none option and set the filter actions to Only render when filtered.
These elements will not load until the filter is applied.
Though I would probably question why you would want to present your users with an empty dashboard and map by default. It doesn’t look great, is not a great user experience, and can give some users the impression that it is not working.
Lame looking dashboard where nothing is loaded when opened.
If you depend on users to read the no selection message to know what is going on in the dashboard, know that a large percentage of your users will not do that. Some will figure it out, others will think it is broken and leave.
I would have the Category Selector default to the first option instead of this. Both methods force the users to select their desired state, but at least this way presents the user with a nicer beginning view.
First impressions matter!
When you used Grouped Values in your Category Selector, the displayed categories are based on field names in the data. Those values may be messy or confusing to the end user.
Overly specific filter choices
It’s not terrible, but the ‘USA’ portion is just an unnecessary distraction. It’s a dashboard containing only US data for a US audience.
You can change what is presented by using the Override or Load Categories buttons.
Override
If you use the Override option, you have to provide the current value, click Add, and then provide the label you want displayed.
Setting a category override
I however, like to skip the first step completely by using the Load categories option instead. All of the options are loaded for me, and I can simply go through and change the labels.
Categories are loaded and ready to be changed.
Spatial Filter
There are a lot of great live datasets available in the Living Atlas. I am frequently using them in projects, but sometimes, there’s just too much data and not a great way to limit it.
Say I wanted to use this great Satellite (VIIRS) Thermal Hotspots and Fire Activity layer to create a dashboard for a Louisiana customer.
Dashboard showing global data.
It’s great that I have access to so much data, but the audience of this dashboard is really only interested in thermal hotspots in the state of Louisiana. There is no state or even country field to filter some of this data out. This layer is also updated every 15 minutes, and I want my dashboard to always be up to date, so that further limits my options. I typically see folks add a Map Extent filter to their dashboard to try and address this issue, but there is a better way. To display only the features that I want I’m going to set up a Category Selector that uses a spatial filter.
I added the Category Selector to my dashboard and connected it to a US State boundary layer.
Dashboard will spatially filter your data differently depending on if you select Features or Grouped values. If you select Grouped values, even if you only have a single feature in that group, Dashboards will use an envelope to spatially filter. Features however, will spatially filter based on the exact geometry of the feature. You can clearly see the difference between these two filters when you look at an oddly shaped state like Louisiana.
Grouped Values vs Features
The Grouped values spatial filter creates a big box (envelope) around your feature(s) and uses that to filter. Which means for a state like Louisiana, a lot of features for Mississippi and some Texas features get caught up in the filter.
Therefore, I set the Categories from value to Features.
I then applied a data filter, so that only the state of Louisiana was included.
Filtering the Category Selector options.
In the Select tab, I entered a single space in the Label field so that no label is presented to the user. I changed the Presentation to Inline and ensured that the None option was not turned on.
We don't need any stinky labels for this dashboard!
On the Actions tab, I added my Actions and set each of them to Spatial.
Spatial filters for the win
Here’s what the dashboard looks like when a user opens it. Only Louisiana data is displayed and there is a fun Louisiana ‘badge’ in the upper corner.
Dashboard that only shows Louisiana data.
For more dashboard tips, check out the rest of the series. Dashboards That Pop.
Happy Dashboarding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.