Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor

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
Highlighted
Honored Contributor

Re: Force a value

Hi Antonio,

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

Cheers

Andrew

Highlighted
Contributor

Re: Force a value

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.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Force a value

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