Create a data expression

Data expressions generate FeatureSets that can be used as data sources for a dashboard's data-driven elements. These expressions are written using ArcGIS Arcade and must return a FeatureSet. You can view sample data expressions to get started using data expressions in your dashboard.

Note:

Before creating a data expression, review the recommended best practices for creating data expressions.

Create a new data expression

To create a data expression, complete the following steps:

  1. Create a dashboard or open an existing dashboard.
  2. Add a new data-driven element, such as a list, indicator, serial chart, pie chart, or gauge.
  3. On the Select a layer screen, click New data expression.
  4. Provide a name for the expression, and if necessary, a refresh interval.
    Note:
    Refresh intervals are not supported on mobile views.
  5. Build the expression in the Arcade editor.
    The expression must return a FeatureSet.
    Tip:

    If you need help with any of the Arcade functions, click the Information button next to the function to see additional details.

  6. Click Done to save the expression.
  7. Configure the rest of your element as required.

Use a data expression

Data expression are only available for the dashboard in which they are created. You can use the same data expression in multiple elements in the same dashboard and it is a best practice to do so when possible. If you already created an expression in your dashboard, when selecting a layer for a new element, the expression is listed in the Data expressions section.

Data expressions that are not used in your dashboard are deleted when the dashboard is saved.

Note:

You can use the ArcGIS Arcade assistant (beta) when creating or editing Arcade expressions. To learn more, see Use the ArcGIS Arcade assistant (beta) in ArcGIS Dashboards.