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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

If then in a select...help

Hi, I'm loading these data and I want to check if the fiel SALESSTATUS is "" the wrtite "1" else leave as it is...

I load the table as you can see, but I don't knot how to do these if then condition...thank's everyone!!

Eduard

SALESLINE:

Load UPPER(ITEMID)AS ITEMID,SALESSTATUS,SALESID,QTYORDERED,INVENTTRANSID,CUSTACCOUNT,EVE_AMOUNTMSTEXCLTAX, year(CREATEDDATETIME)AS ANO, Month(CREATEDDATETIME)AS Mes;

SQL SELECT SALESID,ITEMID,SALESSTATUS,QTYORDERED,INVENTTRANSID,CUSTACCOUNT,CREATEDDATETIME,EVE_AMOUNTMSTEXCLTAX

from DynamicsAx.dbo.SALESLINE;

Concatenate (SALESLINE)

LOAD UPPER(ITEMID) AS ITEMID,SALESID,COSTAMOUNTPOSTED,year(INVOICEDATE)AS ANO, Month(INVOICEDATE)AS Mes;

SQL SELECT ITEMID,SALESID,COSTAMOUNTPOSTED,INVOICEDATE

FROM DynamicsAx.dbo.EVE_CUSTINVOICETRANS;

3 Replies
MayilVahanan

HI

Try like this

Load *, if(Len(trim(SALESSTATUS)) = 0 or IsNull(SALESSTATUS),1,SALESSTATUS) as SALESSTATUS from tablename;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ecabanas
Creator II
Creator II
Author

hi all!!! this does not work.....grrrrrrrr   I'm very tired and I want to solve the problem!!!

MayilVahanan

HI

Len(trim(salesstatus)) = 0 , not solve ?

can you post a sample file?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.