Dashboard Indicator with dynamic text?

2275
12
10-27-2021 09:14 AM
LM16
by
New Contributor

I'm working on a dashboard that contains two map views with linked extents and a category selector for each map so that when a year is selected only that year's data display in the corresponding map. I would like to be able to use the selection made in the category selector as dynamic text for an indicator, so that if the year 1999 is selected for Map 1, the indicator shows that year next to the value. Right now it's just displaying "Map 1: {value}" and "Map 2: {reference}". Can this be done in the advanced formatting options using Arcade? Any suggestions would be much appreciated!

0 Kudos
12 Replies
jcarlson
MVP Esteemed Contributor

Anything that performs actions can act on the value and reference of an indicator separately. If you configure your category selector accordingly, you can tell it to filter the value only, leaving the reference alone.

- Josh Carlson
Kendall County GIS
0 Kudos
LM16
by
New Contributor

Thanks for your reply, but I was asking about the ability to change additional text in the indicator, aside from the value and reference. In the example I gave above, rather than have "Map1: {value}" displayed, I would like to show "1999: {value}", but having the year that's displayed be dependent on the selection made in the category selector.  

0 Kudos
jcarlson
MVP Esteemed Contributor

Oh, I see! So you effectively have an indicator with two values, then, one of them being the year, the other being the "{value}".

Can you elaborate on what the data looks like? What is the "value"? Is it being aggregated? And if so, how?

This still sounds like something doable in a Data Expression (not simply with Advanced Formatting), but will depend a lot on how the data's coming in, and what you want it to look like.

- Josh Carlson
Kendall County GIS
0 Kudos
LM16
by
New Contributor

The data are coming from a hosted feature layer which contains the Year field (integer) used by the category selector and the Acres field (also integer) which is the {value} or {reference} used by the indicator. This hosted feature layer is part of a web map which was used as the basis for the dashboard.

I'm not sure if this will help, but below is a screen grab of the existing expression used by the indicator. The Map 1 and Map 2 in the middleText and bottomText in the IF statement is where I would like to reference the year selected in the category selectors.

LM16_0-1635360777718.png

 

I hope that makes sense and answers your question!

 

 

0 Kudos
jcarlson
MVP Esteemed Contributor

I can see where you were going with it, but unfortunately this doesn't expose any additional attributes for a Selector to act on. But there's a way, using Data Expressions!

The reason I asked if your value was being aggregated is because we'll probably need to aggregate the data in our expression, rather than letting the Indicator handle it.

So, just to be clear: if I looked at your indicator, what is it actually showing me? Is the value the sum of all "sum_Acres" in the whole layer? And is the reference the un-filtered sum? Or are they looking at specific features / subsets of features?

- Josh Carlson
Kendall County GIS
0 Kudos
SimonSchütte_ct
Occasional Contributor III

With the latest (Dec. 2021 version) of ArcGIS Online and ArcGIS Enterprise 10.9.1 it s possible to define Text values for indicators using Advanced formatting:
Data options value type: Feature and Indicator options: Advanced formatting TopText: $datapoint.yourtextfield,

https://enterprise.arcgis.com/en/dashboards/latest/create-and-share/advanced-formatting.htm

0 Kudos
MundellEarth
New Contributor

@SimonSchütte_ct - could you elaborate on this? I can't see how one would pull in the value used in the indicator.

0 Kudos
SimonSchütte_ct
Occasional Contributor III

@MundellEarthThis only works with the new Dashboard (not the Dashboard Classic).
Select the following: "Data" -> "Value Type:Feature", "Indicator" -> enable "Advanced Formatting":

SimonSchtte_ct_0-1648731824216.png

This is great to combine with a Filter.

MundellEarth
New Contributor

Ah...I think I see the point but maybe I am missing something as I'm getting an Arcade error.

For instance, my selector is going to determine if the indicator shows the count of businesses with "active" status or "historic" status. In the screenshot, I would be able to pull in this "Status" as it is an attribute of each data point included in the count?

0 Kudos