Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Perhaps a simple question but couldnt find any answer how I use IF in load-section.
I have a table with a row of notes, ex.:
1, Table, 299, DAMAGED Missing 2 legs
2, Chair, 99, Includes two small sidetables
...
What I want is to easy select all "DAMAGED" goods, making a new column with a boolean (DAMAGED=1/0)
LOAD ...
IF(left(ANM, 7) ='DAMAGED'), DAMAGED=1, DAMAGED=0) as DAMAGED,
..
;
SQL SELECT ...
When using this I get a error saying "Couldnt find field <DAMAGED>".
What is it Im doing wrong?
Thanks!
Hello,
You are very close to the final result. As you are creating a new field based on fields that still not exist in the QlikView model, the assignment of values will look like
LOAD ....
IF(left(ANM, 7) ='DAMAGED'), 1, 0) as DAMAGED,
....
Hope that helps.
BI Consultant
Hello,
You are very close to the final result. As you are creating a new field based on fields that still not exist in the QlikView model, the assignment of values will look like
LOAD ....
IF(left(ANM, 7) ='DAMAGED'), 1, 0) as DAMAGED,
....
Hope that helps.
BI Consultant
Thanks, works perfect.
Sometimes the answer is right in front of you.