# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
New Contributor II

## 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:

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

Thanks

1 Solution

Accepted Solutions
Esteemed Contributor II

## Re: Cell color forbid order table

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())

4 Replies
Esteemed Contributor II

## Re: Cell color forbid order table

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

You need to use Sort by Expression

New Contributor II

## Re: Cell color forbid order table

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

Esteemed Contributor II

## Re: Cell color forbid order table

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())

New Contributor II

## Re: Cell color forbid order table

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

Community Browser