Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

assign background color in edit script window

can we assign background color in the edit script apart from the dimensions box

4 Replies
andrey_krylov
Specialist
Specialist

Hi Sunny. It can be done using a variable.

In the edit script:            vDim1Color = 'If(Dim1 = 'A', Green(), Red())';

In the dimension box:     $(vDim1Color)

jobsonkjoseph
Creator III
Creator III

Yes it is possible, if you have the RGB values.

juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Hi,

I've done something like this a few times. Assuming my dimension is [Country]:

Country_Colors:

LOAD * inline [

Country, R, G, B

USA, 255, 0, 0

Germnay, 0, 255, 0

France, 0, 0, 255

];

Then in background color expression I used

RGB(Only(), Only(), Only())

Anonymous
Not applicable
Author

Thanks for the reply Andrey,

is there possibility to change background color if cell value is changed/updated