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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
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

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