Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Conditionally colour rows in a TableBox

Is there a way to conditionally colour in a row in a TableBox?

For example, if I have a column with a 1, 2 or 3 in it, can I write an expression to set the colour of the row with a 1 to red, the colour of a row with 2 to blue and the colour of a row with 3 to yellow?

Tags (1)
4 Replies
whiteline
Honored Contributor II

Re: Conditionally colour rows in a TableBox

You can but for the color of the cell.

Expand your expression and type an expression for Background color.

To colorize the row you should do it for every expression and also for every dimension.

Not applicable

Re: Conditionally colour rows in a TableBox

I've created an expression on my tablebox called M_Seconds which contains a calculated number of seconds. It's set to 'hidden' in the presentation tab. How should I colour in one or more cells based on this expression?

For example, on the Presentation tab I picked one of the columns, selected 'Conditional' and then entered this expression:

if (CallRef='36207',Red())

expecting this to change the background color of the cell to red but it didn't do anything.

whiteline
Honored Contributor II

Re: Conditionally colour rows in a TableBox

'Conditional' means 'Show condition'.

Expand the 'plus' sign on the left of the name of your expression (tab expressions).

You will find 'Background Color', enter your expression there.

Re: Conditionally colour rows in a TableBox

Hi,

You can use either the Style tab in the object properties, and set it to Pyjama-something that will display automatically one line in one color and the next in a different one, or enable the Design Grid in the View menu, and right click on the table box selecting "Custom Format Cell" and setting a conditional color.

Another option is to use a Pivot table instead of a table box, so you can use the dimension and expression formats as mentioned above.

Hope that helps.

Miguel

Community Browser