Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format background

I need help.
I want to change the background color of a Concepto dimension when I select the variablevConceto.

error loading image

So far no problem. I've done with this function.

if (Concepto = vConcepto,rgb(191,191,191),

if(Total='1.- Ventas',

if((rowno()=0),rgb(216,228,188),rgb(235,241,222)),

if((rowno()=0),rgb(230,184,183),rgb(242,220,219))))

The problem is when I choose two values ??in the variable vConcepto

Happens nothing:

error loading image


Any ideas?

5 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Paco,

Look to use a combination of the match() and concat() functions - the help file should explain.

You'd essentially try to match the variable to the concat of the selected values from the list box.

Unchecked:

=if(match(Concepto,concat(vConcepto,', ')),rgb(191,191,191))

Hope that points you in the right direction.

Matt - Visual Analytics Ltd

Not applicable
Author

Does not work. I'll try to pull support.
Thanks

matt_crowther
Luminary Alumni
Luminary Alumni

Paco,

I knew I was on the right track - solution attached (hopefully).

Using in the Background format:

=if(substringcount(concat(vCountry,', '),COUNTRY)<>0,rgb(198,255,198))

Hope that solves it.

Matt - Visual Analytics Ltd

Not applicable
Author

Comes very close to what I want. But when it selects no way I like to keep the colorschosen ....



matt_crowther
Luminary Alumni
Luminary Alumni

Paco,

Not entirely sure what the remaining issue is but this may solve it:

=if(substringcount(concat(vCountry,', '),COUNTRY)<>0,rgb(198,255,198),rgb(255,198,198))



Where the first rgb() is your highlight when selected colour and the second rgb() is the default red background.

If you need a further level of control on the background you can add another 'if' function in place of the second rgb() value.

Hope that helps,

Matt - Visual Analytics Ltd