Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Solving the Informatica Dilemma: On-Demand Briefing - Watch On Demand!
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator II
Creator II

Alternate rows background color in straight table

I used the below expression to get the alternate rows background color, If(Even(RowNo()), RGB(240, 240, 240), RGB(255, 255, 255)). It is working fine when I have one field but causing issues when add an extra column even if I apply the same expression in both fields.

Labels (1)
1 Solution

Accepted Solutions
alexquimu
Partner - Contributor III
Partner - Contributor III

Hey @jjustingkm ,

 

You need to use the Total key, RowNo(Total), as it calculates the row number across the entire data set being displayed in the tables. Use the following code:

If(Even(RowNo(Total)), RGB(240, 240, 240), RGB(255, 255, 255))

 

If you drop RowNo() and RowNo(Total) to the table (with multiple fields), you will notice the difference between these two.

 

Greetings,

Alex

View solution in original post

5 Replies
alexquimu
Partner - Contributor III
Partner - Contributor III

Hey @jjustingkm ,

 

You need to use the Total key, RowNo(Total), as it calculates the row number across the entire data set being displayed in the tables. Use the following code:

If(Even(RowNo(Total)), RGB(240, 240, 240), RGB(255, 255, 255))

 

If you drop RowNo() and RowNo(Total) to the table (with multiple fields), you will notice the difference between these two.

 

Greetings,

Alex

jjustingkm
Creator II
Creator II
Author

Thank you! that works. Is that possible to change the background color for the field names on the top also?

alexquimu
Partner - Contributor III
Partner - Contributor III

Hey,

 

Do you mean the dimension values? If so, you can click on the field name and change the background color expression. What's the logic you need to apply in this case?

alexquimu_0-1749329301479.png

 

Greetings,

Alex

jjustingkm
Creator II
Creator II
Author

Hi, I am using a straight table and I am referring to the field label in the table.

alexquimu
Partner - Contributor III
Partner - Contributor III

Hey @jjustingkm ,

 

To my knowledge, the background of the field label cannot be directly colored. However, you can modify the text color of the label itself (this is based on the May 2024 version):

alexquimu_0-1749652252268.png

 

Greetings,

Alex