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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to do IF THEN ELSE

Hello Everybody,

 

Can anyone please help me to get the "COST" right ?

Many Thanks In advance

IF LEFT(DESC, 3) = "SRT" THEN (UNITCOST * QTYSHIPPED) * -1

ELSE FCSTSALES

AS COST;

Kind Regards

Aamir

Labels (1)
1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

use below in script editor

if(left(DESC,3)='SRT',(UNITCOST*QTYSHIPPED)*-1,FCSTSALES)  as COST  

hope this helps


Sunil Chauhan

View solution in original post

4 Replies
vincent_ardiet
Specialist
Specialist

Hi,

Try : if(left(DESC,3)='SRT',(UNITCOST*QTYSHIPPED)*-1,FCSTSALES)

Regards,

Vincent

SunilChauhan
Champion II
Champion II

use below in script editor

if(left(DESC,3)='SRT',(UNITCOST*QTYSHIPPED)*-1,FCSTSALES)  as COST  

hope this helps


Sunil Chauhan
Not applicable
Author

Thank you so much Sunil

Aamir

Not applicable
Author

Thanks Vincent for your help