Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
chauhans85
Esteemed Contributor

How to do IF THEN ELSE

use below in script editor

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

hope this helps


4 Replies
vincent_ardiet
Contributor III

Re: How to do IF THEN ELSE

Hi,

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

Regards,

Vincent

chauhans85
Esteemed Contributor

How to do IF THEN ELSE

use below in script editor

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

hope this helps


Not applicable

How to do IF THEN ELSE

Thank you so much Sunil

Aamir

Not applicable

How to do IF THEN ELSE

Thanks Vincent for your help

Community Browser