Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Way to fix expressions

Can someone fix these formulas in order to work on Qlik Sense?

1 -

IF [P_RETURN_DT]=[date] and ISNULL([P_RETURN_DT])=FALSE then

[ORDER_QTY]*[SALE_RPRICE]*-1

ELSE

0

END

2 -

IF [SHIP_DT]=[date] and ISNULL([SHIP_DT])=FALSE then

[ORDER_QTY]*[SALE_RPRICE]

ELSE

0

END

3 - If I'd like to add those two expressions, should I do like this?

          -  [1]+[2]

Thank you.

Tags (2)
8 Replies
nizamsha
Valued Contributor

Re: Way to fix expressions

if(((isNull(Date)=-1 or len(trim(Date))=0) and

isnull(Date1)=-1),(Qty*SalesPrice)*-1,0)

Not applicable

Re: Way to fix expressions

Not workding

sasiparupudi1
Honored Contributor III

Re: Way to fix expressions

if((len(trim([P_RETURN_DT])>0 and [P_RETURN_DT]=[date]),[ORDER_QTY]*[SALE_RPRICE],

   if((len(trim([SHIP_DT])>0 and [SHIP_DT]=[date]),-1*[ORDER_QTY]*[SALE_RPRICE],0))

Not applicable

Re: Way to fix expressions

Thanks for the reply, but not working

sasiparupudi1
Honored Contributor III

Re: Way to fix expressions

Please post a sample.

Digvijay_Singh
Honored Contributor III

Re: Way to fix expressions

Try this, ensure dates are not in text format.

-Alt(if([P_RETURN_DT]=[date],[ORDER_QTY]*[SALE_RPRICE]*-1),0)

-Alt(if([SHIP_DT]=[date],[ORDER_QTY]*[SALE_RPRICE]),0)

Not applicable

Re: Way to fix expressions

How should I add those two?

Digvijay_Singh
Honored Contributor III

Re: Way to fix expressions

You can give labels to them and can use label name as Exp1,Exp2 etc and then use third expression as Exp1 + Exp2

Community Browser