For symbology, I made a simple IIf statment in order to display 'null' values (empty) as 0 in a graduated color scheme. The Arcade if statment is fairly simple. If the 'sector' attribute is 'null', output 0 otherwise keep the existing value.
IIf(IsEmpty($feature.Sector), 0, $feature.Sector);
When the symbology is applied, only 'null' values are displayed as '0' in my graduated colors, but all existing values are ignored and do not display... just like if the 'else' is ignored.
Is there anything wrong?
Interestingly, if I reverse the logic, if the 'sector' attribute is 'null', keep the existing value, otherwise output 99. I get the same 0 value for the graduated symbology!
IIf (IsEmpty($feature.Sector), $feature.Sector, 99);
Is the code or you setting the number of Classes to 1?
Classes are set to 1 because only 1 value '0' is computed (or bugged). I cannot change classes to anything else because only '0' exists. Feature having 'null' values do display correctly on the map with the '0' graduated color...
I just discovered that the Arcade IIf statement works correctly with 'Single Symbol' symbology. It looks like IIf custom statment in Symbology using Graduated Colors is not supported in ArcGIS Pro!
Instead of fiddling with cumbersome IIf arcade statment, I just ticked 'show values out of range' and it works. All features are displayed on the map, whether or not having 'null' values.