Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
menta
Partner - Creator II
Partner - Creator II

customized pyjama color in table

Hi all,

i need to have a report in this way

A
A
B
B
C
C
C

I need to change color at change of the field value, in which way can I configure this?

Thank you

20 Replies
Not applicable

Carlo,

Do you want to have A set as pyjama?  Or do you want it dynamically changing based on data values?

menta
Partner - Creator II
Partner - Creator II
Author

I want something looks like pyjama that change colours dinamically. Only 2 colours (red,blue)  if the value of second row is equal the value of first row same color otherwise other color.

I need to investigate the value of the previous row and the colour of the previous row. I don't know how to investigate the color of the previous row.

I hope now it is more clear. Sorry

Not applicable

Have you tried anything with the above() function?

menta
Partner - Creator II
Partner - Creator II
Author

Yes, the problem is that i don't know the above color. There is a way to take the color of the above row?

Not applicable

Well if the color is based on the value of the row, then couldn't you use an if statement and if they have the same value then assign whatever color is specified?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this as your background expression.

=if(Dimensionality() > 0  // Don't color total row

,if(odd(rangesum(top(TOTAL if(Rowno()=1,1),1,RowNo(TOTAL))))

,rgb(214,235,153) // Odd row color

,rgb(243,249,224) // Even row color

))

-Rob

http://masterssummit.com

http://robwunderlich.com

nagaiank
Specialist III
Specialist III

Qlikview is a BI tool. What is the requirement from business analysis point of view for such a design?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Toggling colors between changes in value seem to be to be a pretty reasonable requirement. It not only makes it easier for the user to see boundaries, but also provides a fast visual indication of the ratio of rows between categories. I wouldn't want to use that all the time, but I could see where it would be useful.

-Rob

menta
Partner - Creator II
Partner - Creator II
Author

Thank you rob, this is that I need.

But i try this expression in a table with 8 dimensions, it doesn't work in this case?

I think the problem maybe the function top(). I don't understand it very well.

Thank you

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this. It should work for any number of dimensions. Replace "Dim1" with whatever dimension field your table is sorted by -- usually the first dim.

=if(Dimensionality() > 0  // Don't color total row

,if(odd(

match(Dim1,$(=chr(39) & concat(DISTINCT Dim1, chr(39)&','&chr(39)) & chr(39)))

)

,rgb(214,235,153) // Odd row color

,rgb(243,249,224) // Even row color

))

-Rob

http://masterssummit.com

http://robwunderlich.com