Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

COLOURS WITH CONDITIONS

good morning, My name's Genny and I work in VR46 the Valentino Rossi's company, I have a problem with the colors on Qlik view and I would like to know if and how I could solve it.
When assigning the background color to a dimension, I use the following routine

=IF ([name dimension]=1,GREEN())

This routine is perfect if I filter the dimension with value = 1 but it is not working without filter. without the  filter, the color (green) doesn't appear.

Can I ALWAYS have a colored dimension (i.e. Green) (even if I haven't filter) ?

thanks!!!!!

1 Solution

Accepted Solutions
fred_s
Partner - Specialist
Partner - Specialist

Hi,

You could try to add an else, like

=IF ([name dimension]=1,GREEN(),RED())

See attchment

Fred

View solution in original post

8 Replies
tresesco
MVP
MVP

It should work fine without condition as well. Could you share a sample that shows the issue?

Not applicable
Author

Hi Genni,

It should without if condition as well.

Try

= RGB(0,255,0)

Thanks!

jagan
Luminary Alumni
Luminary Alumni

Hi,

Do you have that dimension declared in Dimension tab?  If not try using

=IF (Max([name dimension])=1,GREEN())


If not working attach sample file.


Regards,

Jagan.

maleksafa
Specialist
Specialist

you can simply put in the background color only the expression =Green() or use RGB() colors, without any if conditions.

Not applicable
Author

I tried ... nothing to do  

as soon as I can, I send an example thanks

fred_s
Partner - Specialist
Partner - Specialist

Hi,

You could try to add an else, like

=IF ([name dimension]=1,GREEN(),RED())

See attchment

Fred

Not applicable
Author

perfect !!!! With the "else" is ok!!!!!

THANKS!!!!

However, for multiple conditions which is the syntax in qlik?

If I have many "IF conditions" (and then many colours)?


fred_s
Partner - Specialist
Partner - Specialist

Hi Genni,

You can use nested IF:

=IF ([name dimension]=1,GREEN(),

      IF([name dimension]=2,YELLOW(),

      RED()

      )

)