# data[].attributes.body
ESRI blog showing more on how to set conditional formatting

# data[].attributes.attachment_link.readable_text
One of the main jobs of a dashboard is to give an audience information quickly and easily. Seeing numbers and text is useful, but without context, they can be meaningless. There are many ways to provide context to your elements, and with the ArcGIS Dashboards Beta, we have introduced support for Arcade expressions, opening a whole new avenue of conditional formatting.

Using an Arcade expression, you can now define your own logic and apply a variety of different formatting techniques to draw attention to important values, events, and situations. Let's go through how we can use this technique in an e arthquake monitoring dashboard like the one below.

1. Set up the indicator

First, we need to set up our data. In your indicator, we want to get a count of earthquakes within the last 24 hours as well as set up a reference with a count of ea rthquakes between 24 to 48 hours ago.

a. In the tab, from the drop-down, choose to get a count of your earthquake. Apply a to only get a count of earthquakes less than 24 hours old. Enable and again, get the count of earthquakes. Apply two filters. The first, for earthquakes greater than or equal to 24 hours old and the second, for earthquakes less than 48 hours old.

2. Calculate the percent change

Now that we have both the counts of the last 24 hours and the 24 hours before that, we can do a percent change calculation using Arcade to see what the increase or decrease was between the two time periods.

We do this by creating a new variable with the calculation (see below).

4. Format based on conditions

When there is no significant increase in earthquakes, we'll return the following:

In this format, the indicator will simply display the count of earthquakes in the last 24 hours, like the indicator below.

When there has been a significant increase in earthquakes, we'll set the following to return:

With this, if there has been a significant increase in earthquakes, our indicator text will now be red, and text will be added to the bottom stating the percent change from the day before. In addition, we've made it so that an icon also appears beside the count by configuring the "up" icon below the Arcade editor

Finally, when there has been an extreme increase in earthquakes, we'll return the following:

Your final expression will look something like this

Take this technique and apply it to your own data to see how Arcade can be used in your dashboards to set up conditional formatting. Check out the advanced documentation formatting for more information on defining properties in your elements. You can also make a copy of this dashboard to see the expression and the rest of the dashboard's configuration.

The Dashboards team at Esri is excited to see how you use Arcade in your own dashboards to set conditional formatting. If you can, share your innovative dashboards with us using #ArcGISDashboards.

About the authors

Dave is a product engineer and UX designer on the ArcGIS Dashboards team. He enjoys geeking out on data visualization, advancing real-time GIS, and sketching new dashboard features on whiteboards.

Noora is a product writer with a background in Geography and GIS. Originally from Toronto, she's now living and working in Ottawa, Canada where she spends her free time baking, exploring the outdoors, and pretending like she enjoys running.

# data[].attributes.attachment_link.title
Conditional formatting in dashboard indicators with Arcade

# data[].attributes.attachment_link.description
One of the main jobs of a dashboard is to give an audience information quickly and easily. Seeing numbers and text is useful, but without context, they can be meaningless. There are many ways to provide context to your elements, and with the ArcGIS Dashboards Beta, we have introduced support for Arcade expressions, opening a whole new avenue of conditional formatting.

# data[].attributes.attachment_link.description
A simple, portable scripting language for creating custom visualizations and labeling expressions.

# data[].attributes.attachment_link.description
Examples from the ArcGIS Dashboards community