
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help with IF statements
Im quite new to Qlik and this language in general, so forgive how naïve I am to think this IF statement would work but can someone give me some pointers?
IF(Country = 'Iran', rgb(254, 113, 82),
IF(Country = 'Israel', rgb(254, 113, 82),
IF(Country = 'Israel', rgb(254, 113, 82),
IF(Country = 'Afghanistan', rgb(254, 113, 82),
IF(Country = 'Belarus', rgb(254, 113, 82),
IF(Country = 'Burundi', rgb(254, 113, 82),
IF(Country = 'Cambodia', rgb(254, 113, 82),
IF(Country = 'Chad', rgb(254, 113, 82),
IF(Country = 'Congo', rgb(254, 113, 82),
IF(Country = 'China', rgb(254, 113, 82),
IF(Country = 'Cuba', rgb(254, 113, 82),
IF(Country = 'Haiti', rgb(254, 113, 82),
IF(Country = 'Hong Kong', rgb(254, 113, 82),
IF(Country = 'Kazakhstan', rgb(254, 113, 82),
IF(Country = 'Libya', rgb(254, 113, 82),
IF(Country = 'Macau', rgb(254, 113, 82),
IF(Country = 'Mauritania', rgb(254, 113, 82),
IF(Country = 'Moldova', rgb(254, 113, 82),
IF(Country = 'Nicaragua', rgb(254, 113, 82),
IF(Country = 'Niger', rgb(254, 113, 82),
IF(Country = 'Nigeria', rgb(254, 113, 82),
IF(Country = 'North Korea', rgb(254, 113, 82),
IF(Country = 'Pakistan', rgb(254, 113, 82),
IF(Country = 'Palestine', rgb(254, 113, 82),
IF(Country = 'Russia', rgb(254, 113, 82),
IF(Country = 'Somalia', rgb(254, 113, 82),
IF(Country = 'South Sudan', rgb(254, 113, 82)),
IF(Country = 'Sudan', rgb(254, 113, 82),
IF(Country = 'Syria', rgb(254, 113, 82),
IF(Country = 'Tajikistan', rgb(254, 113, 82),
IF(Country = 'Turkmenistan', rgb(254, 113, 82),
IF(Country = 'Ukraine', rgb(254, 113, 82),
IF(Country = 'Ukraine', rgb(254, 113, 82),
IF(Country = 'Uzbekistan', rgb(254, 113, 82),
IF(Country = 'Venezuela', rgb(254, 113, 82),
IF(Country = 'Yemen', rgb(254, 113, 82),
IF(Country = 'Zimbabwe', rgb(254, 113, 82)))))))))))))))))))))))))))))))))))))
Error message shows, IF takes 2-3 parameters.
I have gathered I probably shouldn't write it like this, so does anyone have any pointers?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there is one parethesis too many here
IF(Country = 'South Sudan', rgb(254, 113, 82)),
it should be
IF(Country = 'South Sudan', rgb(254, 113, 82),
SUrely there is a bettere way to do it, but I guess it depends on what you want to achieve...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there is one parethesis too many here
IF(Country = 'South Sudan', rgb(254, 113, 82)),
it should be
IF(Country = 'South Sudan', rgb(254, 113, 82),
SUrely there is a bettere way to do it, but I guess it depends on what you want to achieve...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at it for over 30 minutes, how did I not see that!
Thanks a lot!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
well Frank then flag my reply as accepted solution and not yours 😀

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am dying with shame here, one too many late nights I think.
Thanks again, have a great weekend!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you too Frank😉
