Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

I need help to write an expression in QV

Hi guys,

The output that i want to obtain is the following: if the fieldA = 123 and if the fieldB = 01234, the record must show YES, instead NO. This Is a new fieldC.

FieldA Is in table3, fieldB in the table2, FieldC in table1.

Table1 and table2 have a Key field KeyA, table2 and table3 have a key field KeyB.

What Is the right expression?

Thanks,

Mattia

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Table1:
load * inline [
KeyA,column1,column2,
123,test1,test2
234,test3,test4
];
JOIN
Table2:
load * inline [
KeyB,KeyA,FieldB
abc123,123,01234
abc234,234,00000
];

join(Table1)
Table3:
load * inline [
KeyB,FieldA
abc123,123
abc234,234
];

tempTable1:
load *,if(FieldA='123' and FieldB='01234','YES','NO') as FieldC
resident Table1;

drop table Table1;

View solution in original post

1 Reply
Highlighted
Partner
Partner

Table1:
load * inline [
KeyA,column1,column2,
123,test1,test2
234,test3,test4
];
JOIN
Table2:
load * inline [
KeyB,KeyA,FieldB
abc123,123,01234
abc234,234,00000
];

join(Table1)
Table3:
load * inline [
KeyB,FieldA
abc123,123
abc234,234
];

tempTable1:
load *,if(FieldA='123' and FieldB='01234','YES','NO') as FieldC
resident Table1;

drop table Table1;

View solution in original post