Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to color the whole line in a table with a condition? [Qlik Sense Desktop]

Hi,

I have a table and  I want to implement a condition that when there is just a "-" in the column, the whole line should be colored (background).

I assume this should be made in the Application GUI. So I tried it already like this: "if(len(Value) < 3,lightgreen(), white())", so the affected column is highlited, but not the whole line.

Any hint would be great.

Thank you in advance. !

10 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi bh,

can you upload your qvf?

Andy

Not applicable
Author

Should be easy to reproduce, take any table and go in the first column. There you can mark the table and use the first column and add there a command for the backgroundcolour on the right side under data. This option is taken for the single cell.

Open question, can I expand this feature to the whole line?

I tried already to mention the other columns in the condition but without success..

awhitfield
Partner - Champion
Partner - Champion

Apply the same background expression to other columns in the chart.

Andy

Not applicable
Author

!Due to functional restrictions this is not possible. On the second column I can not add anything because there is no field for background colour.

Or should I add this in the field of the first one? How to separate them (with a "," it does not work)?

Not applicable
Author

Any other hint?

My target is to mark some special fields in a table which contains a "-" --> so that it is easier to recognize that there are missing values.

Ideas?

Not applicable
Author

Can be solved by using a mix-up of these solutions (not like I wanted it, but it's okay):

Re: Alternate colour in table based on value

Background colours for 'Missing' cells

Re: Colour of background depending of cell value

reddy-s
Master II
Master II

As you are not able to colour the entire line using the backgound colour due to functional restrictions, I would suggest you to build an extension to fit your requirment.

Not applicable
Author

I am really worried why everybody is asking for the qvd... ==> no. I don't want to publish my content.

So I've solved this now like this:

I added kpi's instead of dimensions and modified the used form to show only the value without any function. So you get on every field the possibility to create a background colour.


There I added the condition "If(len(Remaining_field) < 3, white(), green())" to every KPI and the result is that the whole line will be green. Only thing is that one dimension has to be there, so I added an additional field, not shown in the GUI but under edit.

Working for me. Thank to all for your help.

Not applicable
Author

Thanks for this hint. But I have absolutly no idea what is mentioned with "build an extension" (maybe I am too new).