Discussion Board for collaboration related to QlikView App Development.
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)
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?
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,....
IF(left(ANM, 7) ='DAMAGED'), 1, 0) as DAMAGED,
Hope that helps.
Miguel Angel Baeyens
Comex Grupo Ibérica
View solution in original post
Thanks, works perfect.
Sometimes the answer is right in front of you.