I am trying to use the Relationship visualization with two numeric attributes; however, one of the variables is negative and therefore, I'd like to use an Arcade expression to look at the absolute value instead. I wrote a simple Arcade expression to return the absolute value. To my chagrin, I found that smart mapping doesn't recognize the transformed variable as numeric and therefore won't allow me use it the relationship. Is this by design or is this a bug?
Does anyone have any ideas on how to achieve this without having to add a field?
You can see/test the issue in this example map from the documentation where global species rarity are displayed in relation to species richness. If I attempt to transform one of the variables by multiplying it by -1, I get a result but it's not interpreted as numeric and therefore the Relationship visualization is not available.
Species Rarity and Richness example map
NegativeRarityAll_TEST expression: return Number(-1* $feature.Rar_all);
This is as designed where we cannot use an arcade expression as the field for how we generate the style and what we store in the web map. You would have to add a field and do the calc on that which could be that expression.