No, date fields cannot be used directly to group values in the table and pie chart elements in ArcGIS Dashboards. These elements support grouping by categorical fields but do not provide options to group records based on date fields or date components. To enable date-based grouping, create derived fields from the date field using either formatted text values or coded integer values with domains, allowing the dashboard to treat each group as a distinct category. As an alternative, use a serial chart element, which supports date-based category grouping in the dashboard.
Use a text field with formatted date values
- In ArcGIS Online, navigate to Content > My content and open the item details 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 NewField.
- Populate the new field by extracting the date 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-DD')
- Click Run calculation.
- In ArcGIS Dashboards, create a new dashboard and add a table or pie chart element. Refer to ArcGIS Dashboards: Create a dashboard for instructions. In this example, a table element is added.
- In the Select a layer window, select the feature layer from the map.
- In the Table or Pie chart window, on the Data tab, set the following configurations under Data options:
- For Table type, select Grouped values. For the pie chart element, select Grouped Values under Categories from.
- For Category field, select the new field from the drop-down list. In this example, it is NewField.
- Configure the table or pie chart element as required and click Done.
- Click Save
> Save on the dashboard’s toolbar.
The dashboard below displays the date values grouped by the text field in the table element.
Use an integer field with a coded value domain
- In ArcGIS Online, navigate to Content > My content and open the item details 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 IntegerField.
- Populate the new field with sequential values based on the ascending order of the date field. In this example, the new field is populated with values 1, 2, 3, and 4 in chronological order of the date values.
Note:
Ensure records with the same date field value are assigned the same value and increase the value only when the date field value changes.
- Create a domain list for the new field and manually assign labels using the date field values. Use Enter values to define the domain list.
- Repeat Steps 4 through 7 from the first workaround to configure the table or pie chart element using the new integer field.
The dashboard below displays date values grouped by the integer field in the table element.
Use a serial chart element
Create a dashboard and configure a serial chart element using the Grouped values option for Categories from on the Data tab. Select the date field from the Category field drop-down list. Refer to How To: Create a grouped line chart in ArcGIS Dashboards for instructions.
The dashboard below displays values from the date field in the serial chart element.