Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Combining 2 tables with different fields, joining on a common ID (key) field... putting all the fields in 1 final table, populating 0 for any nulls


I'm creating an app to calculate a score based on attribute values.  Some of the calculations are complex and are putting some fields in a table of their own called 'Result', while the rest of the attribute scores are calculated and have a resident table called 'Scores'.  Both tables have the key field [BPARTNER].

Table 'Scores' has more BPARTNERs than the 'Result' table...  I would like to append the 'Result' score fields to the 'Scores' table joining on BPARTNER and just have 0 instead of Nulls where 'Result' can't match on [BPARTNER].

What type of join would I need and how do I append those 'Result' score fields to the 'Scores' table?  I'm thinking this will resolve the issue of not being able to set Nulls which actually don't exist in my result table to zeros by possibly forcing zeros with the table join.



1 Reply

To my knowledge you can't automatically assign those zeros for the nulls.  You can deal with it by creating dummy rows before joining or deal with it after the join which is my typical approach. 

See: https://qlikviewcookbook.com/2013/01/filling-default-values-using-mapping/

Another thought is to keep them as separate tables but use Alt(Result,0) in your measure to assign 0 as default.