Gauge based on 2 values

I need a bar gauge to show the condition of a cell based on 2 conditions, voltage and temperature. If either of them is in bad condition I want the bar gauge to show the bad condition. How can we replicate this with help of influxdb query? How can we implement an OR operator in influxdb generated bar gauge?

Are you using Flux or InfluxQL?

I am using influxQL in the particular case.