Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Force a value

Hi guys,

i have my sales table loaded in the followin way:

- Sales data (TABLE A)

- concatenation to sales data table (tABLE B)

then there's a LEFT join to antoher table to retrieve value from another table.

My goal is to set a value retrieved from a left join, as default only for the data coming from table B

anyone knows how i can achive this?

3 Replies
effinty2112
Master
Master

Hi Antonio,

Why not perform the left join on Table B and then after that has been done concatenate tables A & B?

Cheers

Andrew

qlikviewaf
Creator
Creator
Author

The left join is needed to retrieve values from table A and B, but just for values coming from table B i would like to keep a default value on just one field. By the way with the left join i also take some others value that needs not to be defaulted.

Gysbert_Wassenaar

Perhaps like this:

tempData:

LOAD *, 'A' as SourceTable FROM TableA;

CONCATENATE (tempData)

LOAD *, 'B' as SourceTable FROM TableB;


LEFT JOIN (tempData)


LOAD * FROM TableC;


Data:

NOCONCATENATE

LOAD *, If(SourceTable='A', FieldX, 'Default') as FieldY RESIDENT tempData;


DROP TABLE tempData;

DROP FIELDS FieldX, SourceTable;

RENAME FIELD FieldY TO FieldX;



talk is cheap, supply exceeds demand