6 Replies Latest reply: Sep 14, 2011 1:37 PM by chris3110 RSS

    How do joins work in QlikView?

      Hi there,

       

      I posted a question yesterday on "New to QlikView" however I haven't really received a satisfying answer yet; also my initial message was somewhat confusing so I'll repost it here in a more clear form. I'm using QlikView 10.00.9061.7 SR3 on Windows 7 32-bit.

       

      My script looks like this:

      flight:
      LOAD * INLINE [
         day, fligh_id, aircraft
          mon, 1, 737
          mon, 2, 320
          mon, 3, 737
      ];
      
      aircraft:
      load * inline [
       aircraft, seats
        737, 500
        320, 150
      ];
      

      And the results I get are as follows:

       

      Clipboard Image.png

      My questions are:

      1. Why is QlikView computing the last column as a sum(DISTINCT seats) when I didn't ask for a DISTINCT one?
      2. What should I do in order to get the intuitive (and more correct imo) result sum(total <day> seats) = 1150 ?

       

      Thanks to all for your help,

      Chris