Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Highlighting lines in a table box

Hi all,

Is there a way to highlight lines in a table box under certain criteria?

i.e i have the following table

Name Address Country

Lee street1 UK

Mike street2 UK

Mr. street3 IE

I would like to highlight all lines in, say, red if they do not have the country of UK

Thanks again

Mike

1 Solution

Accepted Solutions
Not applicable
Author

Yes. To highlight single fields based on the value of that field, look into Visual Cues.

For your purpose, you need to look at the additional attributes (I don't know what they're really called) under the Dimensions and Expressions. On the Dimension or Expression tab, your items should have a little plus next to them. Click on the plus and you should see some additional attributes. I don't know if you want to change the text color or the background color, but the concept is the same. Right-click on the attribute you want to change and choose Edit Expression. Here you can define a formula to define the color. You can use the function RGB(0,0,0) to define your colors.

=If(Country <> 'UK', RGB(255, 0, 0), RGB(0,0,0)

That would give Red if it's not the UK and Black if it is.

View solution in original post

14 Replies
Not applicable
Author

Yes. To highlight single fields based on the value of that field, look into Visual Cues.

For your purpose, you need to look at the additional attributes (I don't know what they're really called) under the Dimensions and Expressions. On the Dimension or Expression tab, your items should have a little plus next to them. Click on the plus and you should see some additional attributes. I don't know if you want to change the text color or the background color, but the concept is the same. Right-click on the attribute you want to change and choose Edit Expression. Here you can define a formula to define the color. You can use the function RGB(0,0,0) to define your colors.

=If(Country <> 'UK', RGB(255, 0, 0), RGB(0,0,0)

That would give Red if it's not the UK and Black if it is.

Anonymous
Not applicable
Author

They're called attribute expressions.

Not applicable
Author

+ symbol will not come on table box, it will come only on pivot table or straight table if i'm not wrong.

He wants to do in the Table box.

Thanks,

Raghu.

Not applicable
Author

Thanks Michael. I was close.

Sorry, I missed the part about the request being for a table box. I agree, I don't think it is possible in a table box. Mike, is there a reason you need a table box rather than a straight table? I tend to always use straight tables (or pivots) when displaying data.

Are there any benefits to using a table box over a straight table?

Anonymous
Not applicable
Author

Table boxes are quite limited, and they're even slower than sttaight tables. It's easy to create a table that looks the same as table box.

Not applicable
Author

Hi all,

Just want to say thanks for the suggestions and I am trying to create a straight table which mimics the table box. I have never created a straight table, just a pivot table and I have added all my dimensions in but unsure what to use for expressions. If I don't enter an expression, it doesn't provide any data...

Using my example, what would I use as the expression?

Thanks,

Mike

Not applicable
Author

In a straight table, if you really don't have an expression, just put an expression in like =1, then go to the presentation tab and hide it!

Nigel.

Not applicable
Author

Oh yeah! doh!

Anonymous
Not applicable
Author

Nigel,
Your suggestion to use =1 and hide it is certainly correct, but I can't agree with the statement that in a straight table you "don't have an expression". Straight table is no less functional than a pivot table or any other chart, just looks differently.
In fact, when a client wants a long table (many columns), my preference is to use a unique ID as a single dimension, which is hidden, and all other columns as expressions. If they are not calculated, I use expression only(fieldname). This provides better control over the layout.