Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a column named Qty. what i want to do is check the values in that column and overwrite it with new values based on a condition. To further explain my issue:
if (Len(Qty) = 0 OR Qty <= 0)
Col1 as Qty; //lets call this 1st iteration
if (Len(Qty) = 0 OR Qty <= 0) // here i am checking the previously set values (1st Iteration) of Qty
Col2 as Qty; //lets call this 2nd iteration
if (Len(Qty) = 0 OR Qty <= 0)// here i am checking the previously set values (2nd Iteration) of Qty
Col3 as Qty; //lets call this 3rd iteration
and so on...
is this possible to do in Qlik?
Thank you.
Not sure I understand correctly but you can some how achieve it by checking condition in multiple load
LOAD *,
if (Len(Col2Qty) = 0 OR Col2Qty <= 0,Col3) as Col3Qty;
LOAD *,
if (Len(Col1Qty) = 0 OR Col1Qty <= 0,Col2) as Col2Qty;
LOAD *,
if (Len(Qty) = 0 OR Qty <= 0,Col1) as Col1Qty
FROM Table;
Hi Kush,
I see you are making additional columns. Is it possible to assign values to the same column or maybe combine Col1Qty, Col2Qty and Col3Qty into Qty after calculating them?
Technically yes. You need to concatenate all load statement of your Data keeping same Column name. But it will be better if you can post some sample data with expected output then you will get a better solution.