Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
berkarmagan
Partner - Creator
Partner - Creator

Join Problem On Pivot Table

 

Hi,

I need to learn how qlikview joins table. I searched some and I think if i dont write anything about join on script, it joins table like inner join. In my Project i ve got a table in script which has customer codes and their values. At the sam time i ve customer table like below.

If i dont right any join staffs on script it join them with inner join i guess and i losing customers which are not in main table.

I need to calculate according to example below, sum of values which is 5+5+2+5+7 and divide it with count of customers which is 7. IF dont use joins in script qlikview giving me19/5 but i need 19/7. I tried outer join on script but it didnt work. Thanks for ur help for now.

customer codevalue customercode
151
252
423
554
675
6
7
1 Reply
hic
Former Employee
Former Employee

No, you should not join in the script. Just load the two tables:

     Load [customer code], value From Table1 ... ;

     Load [customer code], <other customer fields> From Table2 ... ;

Then you can calculate what you want (in a chart or a text box) through

     =Sum(value) / Count(distinct [customer code])

HIC