Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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

5 Replies
qlikmsg4u
Valued Contributor

Re: Background Colour (Based on Group)

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

Re: Background Colour (Based on Group)

Try like below,

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

joaquinlr
Valued Contributor II

Re: Background Colour (Based on Group)

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

Re: Background Colour (Based on Group)

Hi Joaquin,

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

joaquinlr
Valued Contributor II

Re: Background Colour (Based on Group)

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

Community Browser