Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

8 Replies
nizamsha
Specialist II
Specialist II

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

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

Not applicable
Author

Not workding

sasiparupudi1
Master III
Master III

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
Author

Thanks for the reply, but not working

sasiparupudi1
Master III
Master III

Please post a sample.

Digvijay_Singh

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
Author

How should I add those two?

Digvijay_Singh

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