Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Conditional Formatting

jt1990
5 - Atom

Hi

 

I'm trying to format my dataset using the Table tool so that numbers below 0.25 are unformatted, numbers between 0.25 and 0.5 are coloured green, numbers between 0.5 and 0.75 are coloured orange and numbers above 0.75 are coloured red. 

 

I've used the column rule below but all numbers above 0.25 keep coming out green.

 

IF [Variance_Chargeable]<0.25 THEN "color: black;"
ELSEIF 0.25<=[Variance_Chargeable]<0.5 THEN "color: green;"
ELSEIF 0.5<=[Variance_Chargeable]<0.75 THEN "color: orange;"
ELSE "color: red;"

ENDIF

 

jt1990_1-1599770387074.png

 

Does anyone have a solution for this please?

 

Thanks

5 REPLIES 5
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @jt1990 ,

 

I think you should create a rule for each condition.

 

As an example, if you want green text for values below 0.25 then set the rule as follow :

     - "Apply" : WHEN Variance_Charge < 0.25

     - "Styles" : tick Text Color and pick green.

 

If you need more details tell me.

 

Cheers,

 

Jean-Baptiste

jt1990
5 - Atom

Hi 

 

Thanks for the solution. Unfortunately this didn't work as anything above 0.5 was coloured red and anything below 0.5 was coloured orange. The numbers below 0.25 weren't coloured green. I've pasted screenshots of the rules below - do you have any other suggestions please?

 

jt1990_0-1599809120253.png

jt1990_1-1599809138624.png

jt1990_2-1599809157895.pngjt1990_3-1599809174630.pngjt1990_4-1599809204431.png

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @jt1990 ,

 

For the orange rule, try using "Formula" with "Variance_Charge >= 0.25 AND Variance_Charge < 0.5".

 

Cheers,

 

Jean-Baptiste

jt1990
5 - Atom

Thanks very much - this worked!

 

I have a related question - is it possible to export the table (with formatting) to Excel? Using the Output tool doesn't seem to work.

 

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @jt1990 ,

 

Try using the Render tool in Reporting tools.

 

Cheers,

 

Jean-Baptiste

Labels
Top Solution Authors