Conditional formatting with more than 1 feature

I am trying to color the cells of my pivot table under two coditions:
if dsp_type = ‘DSP1.0’ and avg_routes < 31, then color in red
if dsp_type = ‘DSP2.0’ and avg_routes < 24, then color in red

but I cannot select two different column in the conditional formatting.
I tried creating a measure to use as basis for the formatting, but QS does not let me, since the final_average_routes is a aggregation.

here it is:
ifelse(({DSP type combined} = ‘DSP 1.0’ AND {final_average_routes} < 31) OR ({DSP type combined} = ‘DSP 2.0’ AND {final_average_routes} < 24),1,0)

How can I then solve the issue?

here my table

You can try and make the {DSP type combined} an aggregation.

ifelse((firstValue({DSP type combined},[{DSP type combined} ASC],[{DSP type combined}]) = 'DSP 1.0' AND {final_average_routes} < 31) OR (firstValue({DSP type combined},[{DSP type combined} ASC],[{DSP type combined}]) = 'DSP 2.0' AND {final_average_routes} < 24),1,0)

1 Like