I have an expression to convert decimal degrees to display a cardinal direction:
// Convert degrees to cardinal direction
var wind = $feature.Wind_Dir
When(
wind >= 337.5 && wind < 22.5, 'N',
wind >= 22.5 && wind < 67.5, 'NE',
wind >= 67.5 && wind < 112.5, 'E',
wind >= 112.5 && wind < 157.5, 'SE',
wind >= 157.5 && wind < 202.5, 'S',
wind >= 202.5 && wind < 247.5, 'SW',
wind >= 247.5 && wind < 292.5, 'W',
wind >= 292.5 && wind < 337.5, 'NW',
"N/A"
)
When the expression is used in the popup, everything evaluates correctly EXCEPT when the value falls in the North category... I'm not sure what I'm overlooking here. Thanks!