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: 
yanivvl0
Creator III
Creator III

How to keep the same color concurrently to an expression ?

hi to all ,

i have a BlockChart and a BarChart , and they are "talking" to each other as you can see here :

flowers charts 1.PNG

the colors in the 2 charts are applicable to the numbers ( green blue ) of the expression , the problem is :

when we click on 2010 wich have only green - the color in the BlockChart is changing to blue :

flowers charts 2.PNG

How can we keep the color green for the green_flower ?   thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Chanty4u
MVP
MVP

Hi,

Instead of that.

u can set  ur colur values in  colors tab.... by that it will show for first clr fr frst   value  ....and so on..colr.PNG

Gysbert_Wassenaar

In both charts click on the + in front of the expression, select background color and use an expression like:

pick(match( FlowerColor, 'green_flower', 'blue_flower'), green(), blue() ).

Replace FlowerColor with the name of the dimension than contains the values green_flower and blue_flower. Replace green() and blue() with the colors you want. If for example you set the colors in your palet on the colors tab you could use something like color(1) and color(2) to get the first and second color of the palet. You can also use the RGB(R,G,B) function.


talk is cheap, supply exceeds demand
yanivvl0
Creator III
Creator III
Author

hi Gysbert , i did the first step , and i am stuck , dont understand , do i need to add to the model  a table of color dimension ?

can you show a picture ?

regards.

Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand
yanivvl0
Creator III
Creator III
Author

hi Gysbert , yes , now i can see the solution - THANKS!