myBand values must be between minValue and maxValue.
So after calculating myBand, I’m calculating next, final band, using following expression:
if (myBand > maxValue || myBand < minValue) then NaN else myBand
I wonder if there’s any dedicated tool to filter values of one band instead or if I’m able to type both statements (one to calculate myBand and second to filter values) as one Band Maths expression.
This will not be applied. Only if you further work with SNAP. In other applications it will not be considered.
In this case you need to stick to your first approach.