Unique value counts won't refresh correctly after changing layer's data source

3514
21
08-10-2016 08:02 AM
BrettGoodwin
New Contributor II

First off, I'm happy to see the ability to sort by value count in the symbology pane for a layer in Pro.  Unfortunately, after changing the data source for a layer, the value counts don't refresh properly and sorting by count stops working. Value counts that should now be zero are denoted with a question mark, but because the sorting option doesn't work I still have to manually select these values to remove them.

The picture below shows some of the resulting values after changing data sources, refreshing the count, and then sorting by count ascending.

0 Kudos
21 Replies
GIS_Spellblade
Occasional Contributor

I'm running into this issue when dealing with an Arcade Expression; it works fine when using just attribute-based symbology from stock data sources-- --it does not work when using an Arcade Expression. 

-- Edit --

I'm using a When() function to consolidate attributes to a more meaningful symbology.

Xander Bakker‌, do you know who would know about this? Or am I doing it wrong  

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi gisspellblade ,

Can you share the expression that you are using and explain a bit more about your data?

0 Kudos
GIS_Spellblade
Occasional Contributor

Hi Xander Bakker‌,

Sorry for the slow response on my end, this is the expression that I am using within the Symbology tab:

WHEN(
$feature.CASE_STATUS == "Open - Founded", "Open",
$feature.CASE_STATUS == "Open - Pending", "Open",
"Closed")

This data is comprised of inspection case records with a possibility of 4 different statuses; however, for reporting purposes, I've been asked to show status as either open/closed. The above snippet changes two of the statuses to a singular: "open" and I rely on the default option to force the others into a "closed" status. When using an Arcade expression, the count data continues to show as a "?" but when using one of the regular columns the count feature works as intended. My band-aid solution was to manually count the records with a selection sort and then write that into the label.

Arcade1

Arcade2

Regular Column

Let me know what you think,

JC

0 Kudos
MichaelVolz
Esteemed Contributor

Are you by any chance processing EnerGov generated data through Pro?

0 Kudos
GIS_Spellblade
Occasional Contributor

Hi Michael Volz‌, this is EnerGov data. We're not generating anything through Pro, we are handling all of the EnerGov-to-GIS stuff through SQL queries and pushing that to our SDE.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi gisspellblade ,

Can you share a screenshot of your data?

0 Kudos
GIS_Spellblade
Occasional Contributor

Hi Xander Bakker‌, here's what a sample of my data looks like. Let me know if you'd like anything further.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Jordan Carmona ,

I don't see anything strange in your data, the values are there and your expression is correct, The field does not have a domain defined (so you are not checking against domain codes). The only thing I can think off is that there might be an additional space or something that can break the expression.

Could you try this?

return Split($feature.CASE_STATUS, " ")[0];

It will split the text using the space and take the first element which should result in Open or Closed

0 Kudos
GIS_Spellblade
Occasional Contributor

Hi Xander Bakker‌,

I really like that!, definitely a much more elegant way of handling this. However, I still am not able to access features counts. I also exported this feature to a file geodatabase from our enterprise geodatabase and am still not able to access the counts using an Arcade expression.

Below is a screenshot of the new expression in our SDE.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Jordan Carmona ,

I see what you mean. I added the count based on an expression and initially it showed for a fraction of a second and after this it never showed again. I guess this could be a bug...

0 Kudos