Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
BOYERWMAP
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

Hello,

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.

Thanks!

Wendy  

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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.

-Rob