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

1 Solution

Accepted Solutions
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

View solution in original post

20 Replies
Not applicable

Carlo,

Is this something you want to manually set or have dynamically change as you make selections?

Not applicable

Hi,

Expand the Dimension/Expression you used and in Text color, give the Expression as if(FIELD='A' or FIELD='C',RGB(255,0,0),RGB(0,0,255))

Hope it helps.

Thanks.

menta
Partner - Creator II
Partner - Creator II
Author

the table is a sample, i want to change dinamically the color, i don't know the values inside the field

Not applicable

Could you be a little more specific with your scenario?  Using conditional statements with setting the RGB values is the right approach, but without more information its harder to give you more help

its_anandrjs

Load another color table to get color values dynamically see the example

Eg:-

Source:

LOAD * Inline

[

COL,Val

A,3

A,5

B,6

B,8

C,3

C,6

C,8

];

ColorTable:

LOAD * Inline

[

COL,RED,GREEN,BLUE

A,255,0,0

B,0,0,255

C,255,0,0

];

And then in chart in dimension click on + and in Text Color properties add the function RGB(RED,GREEN,BLUE)

Hope this helps

menta
Partner - Creator II
Partner - Creator II
Author

I need a dinamic pyjama, the scenario is not important, i want to change the colour of the field value when this change,

Not applicable

Well the way you'll write your expression will be different according to what the scenario is.  Otherwise strategies from other posters are general ideas of how to do things

menta
Partner - Creator II
Partner - Creator II
Author

Ok, I attach a sample, I need something that works in same way as the pyjama style but dinamically on changing of the filed A. On changing of the value in field A i need to change his colour.

scenario.png

Not applicable

Hi,

Go to Style in properties and change Current style to Pyjama Blue/Pyjama Green whatever Background color you need.

After that Right click on the Cell in the chart and select Custom Format Cell-> Text color

Hope that helps.

Thanks.