Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Flag creation in data load editor?

Hi all ,

I have two fields DSI , open orders and report metric key. The condition for flag creation is DSI< 14 and open orders =0, and report metric key 4 or 5, What should be the expression like?

I tried below expression but getting error in data load editor..

if( report_ metric_ key=4 or report_ metric_ key=5,

if(DSI<14 ad open_ orders=0,'14 DSI' &'_'&'0 open_orders')) as DSI_open_orders,

Thanks

Juna

9 Replies
MK_QSL
MVP
MVP

If(DSI < 14 and open_orders = 0 and Match(report_metric_key,4,5), 1,0) as Flag

Anonymous
Not applicable
Author

It works absolutely fine. But is there any way to create a value like I did '14 DSI' and '0 open Orders' so that we can filter on .My team lead wants that way so

Thank you Manish

MK_QSL
MVP
MVP

What exactly you want to create?

can you give example?

Anonymous
Not applicable
Author

thanks to manish ..

may be this ?

If(DSI < 14 and open_orders = 0 and Match(report_metric_key,4,5), '14 DSI',' '0 open Orders') as Flag

Anonymous
Not applicable
Author

Hi Alluraiah,

Syntax error . But was looking for expression like this where value is created for DSI and open Orders on top of which visualisation can be created.

Thanks

Juna

MK_QSL
MVP
MVP

If(DSI < 14 and open_orders = 0 and Match(report_metric_key,4,5), '14 DSI', '0 open Orders') as Flag

vinieme12
Champion III
Champion III

You want one flag field to tell you everything?

what if only two of your conditions are true??

DSI < 1 and open_orders = 0 but report_metric_key <> 4,5  , what should the flag say?


You will need Nested IF's

     if(DSI < 1 and open_orders = 0 and Match(report_metric_key,4,5) , '14 DSI and 0 Open Orders',

          if(DSI < 1 and open_orders > 0 and Match(report_metric_key,4,5) , '14 DSI',

                   if(DSI > 1 and open_orders = 0 and Match(report_metric_key,4,5) , '0 Open Orders')))


Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Thank you Manish and Vineeth.

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!