Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change colour in a chart

Hi,

I have Bookmark aaa, where I select Client cc.

I want to see different color for it in a chart.

Or how can I see different color just for 1 client?

I attached a simple file as an example.

Thanks,

1 Solution

Accepted Solutions
Nicole-Smith

On your chart, add a background color expression for your first expression:

=if(Client = only({BM01} Client), lightred(), blue())

Capture.PNG

Your chart should then color whatever is in your bookmark red and everything else should appear blue.

Capture2.PNG

View solution in original post

17 Replies
Anonymous
Not applicable
Author

in the 1st expression for the background color chenge the expression to

=if (getselectedfiedl(client)='aa', rgb(255,255,0), rgb(255,0,0))

Anonymous
Not applicable
Author

yes, but client is changed dynamically.

Anonymous
Not applicable
Author

try this

=if (getselectedfiedl(client)='aa', rgb(255,255,0),

getselectedfiedl(client)='bb', color2

getselectedfiedl(client)='cc', color3)))

Anonymous
Not applicable
Author

Not in my case. I have thousands clients

Not applicable
Author

Try this for color expression:

=if(GetSelectedCount(Client)>0,

if(match(Client ,concat(distinct Client, ', ')),rgb(255,0,0),rgb(10,100,0))

,

rgb(10,100,0))

This will highlight the selected clients in red.

It may also make sense to change Result and res to ignore selections in this case:

avg({1}Result)

Sum ( {1}[res])

shree909
Partner - Specialist II
Partner - Specialist II

you can create variable  vclient= client

and it the expression back ground write if( client ='$(vclient)',rgb(255,255,255),rgb(0,0,0))

something like this. when ever u select a different client then respective colors are shown up.

hope this helps

Nicole-Smith

On your chart, add a background color expression for your first expression:

=if(Client = only({BM01} Client), lightred(), blue())

Capture.PNG

Your chart should then color whatever is in your bookmark red and everything else should appear blue.

Capture2.PNG

Anonymous
Not applicable
Author

Hi nicole_kowalsky,

Thanks for idea, It works.

How can I manage dynamically bookmark? I want to set up a trigger on leave sheet.

Thanks all you guys,

Nicole-Smith

Can you further explain what you would like your dynamic bookmark to do?