Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ziabobaz
Contributor II

JOIN tables when field values are zero

Hi,

Situation: I want to Join OrderId table with Main_Table by [Number] field.

I want to record Channel/Source/Campaing values from OrderId to the Main_Table (currently there are no values there), where Map = Table2

Screenshot_4.jpg

The script:

Left Join (Main_table)


Load

'Table2' as map,

number,

channel,

source,

campaign


RESIDENT OrderIdSourceTMP;

Drop Table OrderIdSourceTMP;

The problem is that the tables are not joined because Channel/Source/Campaign in MainTable are considered to exist, although they equal to zero.

Is there a magic sauce?

Thank you!

2 Replies
JustinDallas
Valued Contributor

Re: JOIN tables when field values are zero

It looks like what you need is called an Outer Join, those exist in SQL too.

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptPrefixes/Outer.htm

Digvijay_Singh
Honored Contributor III

Re: JOIN tables when field values are zero

I think if you just use 'Join' in instead of 'left join', it would create new row in the final table, not sure if you want 'social, facebook,123' to reflect in the same row where 'xxx', 'yyy' exists or another row would do.

Community Browser