Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Vidit
Creator
Creator

Alternative marking of group of rows?

Hi I have the following pivot table.

In which i want to differentiate each group of rows, may be by changing the background color of each set of rows alternatively.

Project NumberProject NameYear - MonthResBudSchQua
E-2012-007A2012-081111
2012-091111
2012-101111
2012-111111
2012-121111
2013-011111
2013-023332
2013-033332
2013-043332
E-N-2013-002B2012-101111
2012-111111
2012-121111
2013-011111
2013-021111
2013-031111
2013-041111
G-2012-015C2012-082223
2012-092233
2012-102232
2012-112222
2012-122222
2013-012322
2013-022322
2013-032222

Desired O/p:

table.JPG

Can Any one suggest a solution?

Leo

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

14 Replies
alexandros17
Partner - Champion III
Partner - Champion III

In the dimension backgroung property set

=

if(odd(RowNo()),RGB(255,0,0), rgb(0,0,255))

hope it helps

Gysbert_Wassenaar

Maybe something like this as expression for the background color for the dimensions and expressions:

if(even(FieldIndex('Project Number',[Project Number])),LightGray(200),Yellow(100))

Change Project Number with the name of your Project Number dimension.


talk is cheap, supply exceeds demand
Vidit
Creator
Creator
Author

Hi Gysbert,

I tried with the following expression, but it doesnt give the desired result,

if([Project Number] = Above([Project Number]), RGB(100,100,100), RGB(100,0,0))

Vidit
Creator
Creator
Author

The RowNo() returns the number of the row within a gruop of rows, but as soon as the group changes it resets to 1 again. Hence The above can be used if we want alternate coloring of rows in general, but for alternate coloring of grouped rows its not useful.

calvindk
Creator III
Creator III

Here you go:

if(odd(Aggr(Nodistinct RowNo(), [Project Name])), RGB(100,100,100), RGB(100,0,0))

Vidit
Creator
Creator
Author

I used the expression in Background color of 'Sch' but its not working.

alexandros17
Partner - Champion III
Partner - Champion III

Have you tried my expression ... it works ....

=if(odd(RowNo()),RGB(255,0,0), rgb(0,0,255))

Alexandros17

Vidit
Creator
Creator
Author

It works for the alternate coloring of rows, but if you see the desired output, i want all the rows with same 'project Number' to be of same color, i.e. the color should change for groups of rows alternativly. please refer to the image for better understanding,

can you please share the sample if its working for you?

Thanks

Leo

calvindk
Creator III
Creator III

See attached.

If that is not what you want, please upload alternative example.