
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use CASE WHEN function in Qlik Sense?
Good Day.
May I ask questions regarding syntax/function on Qlik Sense.
What is the equivalent syntax of CASE WHEN in Qlik Sense?
Please see below sample query
SELECT CASE WHEN computed_dpd <=0 THEN 0 ELSE computed_dpd END computed_dpd_sample FROM temp_table;
scenario: to set computed_dpd to zero (0) if <=0 else retain the value of computed_dpd
- Tags:
- functions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can try below
load if( computed_dpd <=0, '0', computed_dpd ) as Your field name,
...
FROM ...;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your prompt response.
I already tried below functions but still no effect on the data,
Please refer to attached screenshot of output under COMPUTED_DPD_REV column
Thank you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simply you can try with
Rangemax(COMPUTED_DPD,0) as COMPUTED_DPD_REV

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
All negative and zero computed_dpd was already set to zero (0) using below function, However all positive value was gone, not included on the data
--load if( computed_dpd <=0, '0', computed_dpd ) as Your field name,
Thank you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so try with range max.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, it was already works, Thanks for your support.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The image you posted looked good... COMPUTED_DPD_REV is starting from 0 onwards...what is the issue?
