Summary
In ArcGIS Dashboards, selectors can be used to filter features by month ranges based on the month component of the date field. This is useful when temporal analysis focuses on monthly patterns rather than individual dates. When the selectors are properly configured, they can filter records within a single year or across multiple years using a derived month or month-year field.
This article describes the options for filtering features by month ranges using ArcGIS Dashboards selectors.
Procedure
Configure the date selector
Create a dashboard and configure a date selector with filter actions using the Slider display type and the Month resolution in ArcGIS Dashboards. Refer to ArcGIS Blog: A smoother way to explore dates: Date selector slider for more information.
The dashboard below displays features filtered based on a month range using a date selector.
Use a category selector
- In ArcGIS Online, navigate to Content > My content and open the item page of the hosted feature layer containing the date field.
- Add a new text field to the attribute table. In this example, the newly added field is Year_Month.
- Populate the new field by extracting the month and year values from the date field.
- On the Data tab, in the Table view, click Options
in the header of the new field and select Calculate. - On the Calculate field page, select Arcade and click Next.
- Under Arcade expression, copy and paste the expression below. Replace <fieldName> with the name of the date field.
Text($feature.<fieldName>, 'YYYY-MM')
- Click Run calculation.
Note:
The values in the new field are calculated in YYYY-MM format using numeric values instead of month names to ensure chronological sorting in the dashboard.
- In ArcGIS Dashboards, create a new dashboard and add a map element. Refer to ArcGIS Dashboards: Create a dashboard for instructions.
- Add a category selector to the dashboard.
- Click View
on the dashboard’s toolbar. - In the View pane, click Sidebar > Add sidebar > Done.
- On the Sidebar tab, click Add selector and select Category selector.
- In the Category selector window, on the Data tab, under Data options, set the configurations.
- For Categories from, select Grouped values. In the Select a layer window, select the feature layer from the map.
- For Category field, select the field from the drop-down list. In this example, it is Year_Month.
- On the Selector tab, under Selector options, set Selection to Multiple.
- Click the Actions tab. Under When selection changes, click Filter to expand the action section, then toggle the feature layer on.
- Click Done. Click Save
> Save on the dashboard’s toolbar.
The dashboard below displays features filtered based on a month range using a category selector.
Use a number selector
Note:
This workaround applies only when the date field contains data covering month ranges within a single year.
- In ArcGIS Online, navigate to Content > My content and open the item page of the hosted feature layer containing the date field.
- Add a new integer field to the attribute table. In this example, the newly added field is Months.
- Populate the new field by extracting the month values from the date field.
- On the Data tab, in the Table view, click Options
in the header of the new field and select Calculate. - On the Calculate field page, select Arcade and click Next.
- Under Arcade expression, copy and paste the expression below. Replace <fieldName> with the name of the date field.
ISOMonth($feature.<fieldName>)
- Click Run calculation.
- In ArcGIS Dashboards, create a new dashboard and add a map element. Refer to ArcGIS Dashboards: Create a dashboard for instructions.
- Add a number selector to the dashboard.
- Click View
on the dashboard’s toolbar. - In the View pane, click Sidebar > Add sidebar > Done.
- On the Sidebar tab, click Add selector and select Number selector.
- In the Number selector window, on the Selector tab, under Selector options, set the configurations.
- For Display type, select Slider.
- For Input type, select Range.
- For Limits from, select Statistic. In the Select a layer window, select the feature layer from the map.
- Under Limits from, for Field, select the field from the drop-down list. In this example, it is Months.
- Click the Actions tab. Under When selection changes, click Filter to expand the action section, then toggle the feature layer on.
- Click Done. Click Save
> Save on the dashboard’s toolbar.
The dashboard below displays features filtered based on a month range within a single year using a number selector.