Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Can I change the background color for rows of data based on a condition?

rwsarisky
7 - Meteor

I want to be able to highlight specific rows of my data based on a certain condition (i.e. if the net receivable is greater than the designated credit limit).  How can I do this?

10 REPLIES 10
jrgo
14 - Magnetar

@rwsarisky,

 

Assuming you're referring to the Reporting tools, yes. Images below are from the tool example for the "Table" tool.

image.pngimage.png 

 

Hope this helps!

 

Jimmy

rwsarisky
7 - Meteor

thank you!

gbogguri
5 - Atom

Hi, I too require a similar kind of solution. I want to populate a cell/row based a condition. My input is an excel sheet. I want highlight with some color. Any ideas ?

MCDR929
8 - Asteroid

@jrgo I'm working on something similar, but having trouble with the formula, which I want to only apply when WHSE equals NC1.

 

I'm using this expression, but it's only changing the text color.  I need it to change the background or fill color instead.

 

IF [OnHand]> 10 THEN "color:green" ELSE "color:null" ENDIF

 

What am I missing?

 

Ideally, I'm trying to get to the point where I can create an expression to consider 2 fields (ie, if SKU = 16 and OnHand>=10 then green background AND if SKU = 16 and OnHand<10 then red background.  Thoughts?

 

Capture1.PNGCapture2.PNG

jrgo
14 - Magnetar

@MCDR929,

 

Try this formula:

IF [OnHand]> 10 THEN "background-color:green" ELSE "background-color:null" ENDIF

Other option would be to use the formula option in the "Apply" section to create your criteria and then apply the necessary format when it's true. This way, you won't have to use HTML property tags.

 

You can also create multiple row rules so one would be for green and create another for red. 

MCDR929
8 - Asteroid

@jrgo

Thanks, this worked.  But because of the "null", now the null is overriding multiple rules.  Basically, I am trying to get cells to color red when values are below 5, orange if between 5 and 10, and green if greater than 10.  I used your expression to create the red and green rules, but only one is making an appearance.

 

In this image, I have both rules set up.  But it's only displaying the rule falling within the red parameters. 

 

Would an embedded IF work in this scenario? 

 

NC1Red.PNG 

 

 

jrgo
14 - Magnetar

@MCDR929,

 

Take a look at the attached. It produces the below using multiple conditions. Setting up your row rules similar to this example should get you the result you're looking for.

image.png

MCDR929
8 - Asteroid

Great, thanks so much for the assist @jrgo !

Spartucus46
7 - Meteor
Hi I’m having the same issue except I’m unable to view the output of the table tool when I put a browse tool in. Is there something I may be missing?
Labels