1 Reply Latest reply: May 20, 2011 1:03 PM by Daniel Rozental RSS

    Many to many relationship

      Hi,

       

      let's say I've Drivers and Cars tables and a third table which relate them.Something like this:

      Driver               Car                StartDate          EndDate

      Sam                 AB123           2010-10-01       2011-01-31

       

      I've also a Mileage table like this

       

      Car          Date                 Km

      AB123     2011-01-01      110

      AB123        2011-01-02       90


      How can I model this in QlikView?
      How can I create an expression to show the total mileage of Sam while he was driving AB123 (that is, with Date between StartDate and EndDate)?

       

      Kind regards,
      Corrado

        • Many to many relationship
          Daniel Rozental

          It might depend on how big your tables are, what graphs and tables are you trying to achieve.

           

          If it's not too large the you could just split the first table by date

          Driver Car Date

           

          You can do that by doing an interval match from the first table to a calendar table with all dates.