9 Replies Latest reply: Dec 30, 2016 5:23 PM by Onno van Knotsenburg

# 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

• ###### Re: Flag creation in data load editor?

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

• ###### Re: Flag creation in data load editor?

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

• ###### Re: Flag creation in data load editor?

What exactly you want to create?

can you give example?

• ###### Re: Flag creation in data load editor?

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

• ###### Re: Flag creation in data load editor?

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

• ###### Re: Flag creation in data load editor?

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

• ###### Re: Flag creation in data load editor?

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')))

• ###### Re: Flag creation in data load editor?

Thank you Manish and Vineeth.