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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
hlines_usacs
Creator II
Creator II

Alternating Row Color not working

Hello, I am trying to get alternating row colors in a table within Qlik Sense. I am using this expression for the measure, where cGrey and cWhite are variables with color codes in them. I have 4 dimensions.

=if(Even(RowNO(total))=0,cGrey,cWhite)

When I have the RowNO(total) as a measure field, it works as expected, but as soon as I remove that column, it shows incorrectly.

How can I correct this so that every other row is grey?

 

with rowno as column.jpgwithout rowno as column.jpg

6 Replies
Channa
Specialist III
Specialist III

=IF(mod(RowNo(),2),red(),Green())

 

it will help you

Channa
hlines_usacs
Creator II
Creator II
Author

Thank you, but that does not work. It turns ever row one color. I also tried with 'total' and the same behavior happens from my original question. 

=IF(mod(RowNo(),2),cGrey,cWhite) -> turns all rows grey

=IF(mod(RowNo(total),2),cGrey,cWhite) -> same behavior as original question

Channa
Specialist III
Specialist III

where you doing color expression

 

may be attach will help

Channa
hlines_usacs
Creator II
Creator II
Author

I am putting the expression in the Background Color of the dimension.

dimension.jpg

Channa
Specialist III
Specialist III

=IF(mod(RowNo(),2),red(),Green())

=if(Even(RowNO(total))=0,LightBlue(),Green())

if(mod(RowNo(total),2)=0,green(),blue())

 

one of these expressions should work

Channa
hlines_usacs
Creator II
Creator II
Author

Would someone from Qlik be able to look at this and see if it is a bug or working as designed?