community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

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

Highlighted
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?

Alteryx Certified Partner

@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

Meteor

thank you!

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 ?

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

Alteryx Certified Partner

@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. 

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 

 

 

Alteryx Certified Partner

@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

Asteroid

Great, thanks so much for the assist @jrgo !

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