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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Background Colour (Based on Group)

Hi there,

I have a Pivot Table with a few dimensions, i want to be able to change the background colour of the expression based on which group it falls into under the last dimension, so in pseudo code

if leg (Dimension) = 'Transferred in' then colour1

if leg = 'Primary' then colour2

else colour3

colour2.JPG

Thanks

Labels (1)
5 Replies
qlikmsg4u
Specialist
Specialist

Try like this

Expression > Background Color

=If(Leg='Transfered In',RGB(111,111,111),IF(Leg='Primary',RGB(222,222,222),RGB(150,150,150)))

Replace RGB with your colors.

Not applicable
Author

Try like below,

if(wildmatch(Leg,'Transfered In'),green(),if(wildmatch(Leg,'Primary'),red()))

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi Stephen2014

You can also do this in Expression > Background Color

If (dimensionallity() = 0, blue(), if (dimensionallity() = 1, green(), if (dimensionallity() = 2, yellow(), red() )))

dimensionallity = 0 is the most left level, you can create a expresion with = dimensionallity() to check the correct level.


Hope this helps you

Joaquín

Not applicable
Author

Hi Joaquin,

Thanks for this, i actually got it right using a combination of Dimensionality() and wildmatch()

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi Stephen Naude

I'm glad for this, then mark one answer as 'Correct answer' and other as 'Helpfull answer' to close the post.

Regards

Joaquín