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: 
Anonymous
Not applicable

Cell color forbid order table

Hello,

I have a straight table with this condition for background color in measures:

     If(odd(RowNo(total))=0,RGB(222,255,222),RGB(240,255,224))

If I use this formula for background cell color, tables looks ok but I can't order by headers:

pabajo.JPG parriba.JPG

Whitout this expression for color works fine, why? How Can I solve it?

Thanks

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Unfortunately, I don't think we have any other option

but try below, if you have only one dimension, replace Dim3 with your ActualFieldname

=if(odd(Match(Dim3,'$(=concat(Distinct Dim3,chr(39)&Chr(44)&chr(39)))')),lightgray())

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

Rowno() is an inter-record function so you won't be able to sort by headers

You need to use Sort by Expression

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Thanks you Vineeth, is more important the possibilty of order by header than the color... Do you know if there is a way to get this kind of table color (alternating colors) without use the rowno() function?

Thanks you so much again

vinieme12
Champion III
Champion III

Unfortunately, I don't think we have any other option

but try below, if you have only one dimension, replace Dim3 with your ActualFieldname

=if(odd(Match(Dim3,'$(=concat(Distinct Dim3,chr(39)&Chr(44)&chr(39)))')),lightgray())

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

It works fine but when you order by val lost the color alternate dinamic, thakns you for all!