
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what is the syntax for if else in qliksense for visualization
what is the syntax for if else in qliksense for visualization
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should be the same one as QlikView
If(Condition, True, False)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny,
It is exactly the same
G.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I believe so

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Please let me if it is possible to check for a range of values and give different colors. Something like 20-30 and give red color, 30-40 yellow color etc..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, try like this:
If(FieldName > 20 and FieldName <= 30, Red(),
If(FieldName > 30 and FieldName <= 40, Yellow(),
If(FieldName > 40, Green())))

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if else should generally be your option of last resort when it comes to writing expressions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if((Sum()/Sum()) < 0.3,red(),
if((Sum()/Sum()) > 0.4,Blue()),
if((Sum()/Sum()) > 0.5,Green()))
This is giving syntax error? If I comment the last line and adjust the brackets it works properly. But when I put the last line it gives error?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If(FieldName > 20 and FieldName <= 30, Red(),
If(FieldName > 30 and FieldName <= 40, Yellow(), Green()
))
please try this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be you need another parenthesis at the end to close the first if:
if((Sum()/Sum()) < 0.3,red(),
if((Sum()/Sum()) > 0.4,Blue()),
if((Sum()/Sum()) > 0.5,Green()
)
)
)

- « Previous Replies
-
- 1
- 2
- Next Replies »