That’s the way you have to do it. Use Band Math on each band. You can also create a graph XML file and use it on the command line.
You could also change the valid-pixel expression for each of the bands (select properties from the context menu of a band).
On the command line the Image-Filter operator could be used.
gpt Image-Filter -h