Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Apply Conditional Format to Numbers only for a Column with both Integers and String value

dhruvb
5 - Atom

Hi,

 

I am trying to apply Conditional format to a column which is in V_W String format as it contains both String and Integer values. 

 

I want to apply the conditional format only to the numbers and not the Sting value (Eg: Do not ant to apply on Sting value "Above 100")

 

Formatting required is >50 cell color red. 50-100 cell color Green.

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @dhruvb,

 

You could use the table tool for this and create two conditional column rules:

 

Red: ToNumber([Column1]) < 50 AND Regex_Match([Column1], '[0-9.]+')

Green: ToNumber([Column1]) >= 50 AND Regex_Match([Column1], '[0-9.]+')

 

Jonathan-Sherman_0-1594032156542.png

 

Result:

 

Jonathan-Sherman_0-1594031926094.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

 

dhruvb
5 - Atom

Thank you Jonathan for the solution. 

 

If my column keeps changing and I want to add this conditional format to any Dynamic columns added in future, How can I do that?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @dhruvb,

 

Creating Column Rules on "Dynamic or Unknown" fields (ensure it's ticked) will apply this formatting to any new columns.

 

Red: ToNumber([_CurrentField_]) < 50 AND Regex_Match([_CurrentField_], '[0-9.]+')

Green: ToNumber([_CurrentField_]) >= 50 AND Regex_Match([_CurrentField_], '[0-9.]+')

 

Jonathan-Sherman_0-1594035787942.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

 

Labels
Top Solution Authors