2 Replies Latest reply: Nov 26, 2014 8:24 AM by Quy Thanh Lê RSS

    How to interrelate two tables with dates ?

      Hi everyone,


      I have an issue in Qlikview and don't know how to proceed.


      I have 2 tables in a database : Table1 (train routing) & Table2 (season)

      In table1 we have rows like :

      • departure_station (ex: Paris), arrival_station (ex: London), departure_time (ex 24/12/2014 10:00), arrival_time (25/12/2014 11:00)

      In table2 we have rows like :

      • season_description (ex WINTER 2014), date_begin (ex 20/12/2014 00:00), date_end (ex 20/03/2015 00:00)



      In my Qlikview doc, I have load the two tables like :


      LOAD Dep_station, Arr_station, dep_time, arr_time, Date(Floor(Date(dep_time,'DD/MM/YYYY'))) as DateUnique ;

      SQL SELECT *

      FROM "Table1"

      WHERE dep_time>= '01/01/2012';


      LOAD DISTINCT Season_DESCRIPTION, floor(date_BEGIN) as S_BEGIN, floor(date_END) as S_END


      SQL SELECT * FROM Table2 WHERE date_BEGIN>= '01/01/2011';


      In the graphic view I just want a table with all information of table A and a filter so that when I choose a season in B (ex: Winter 2014), it filters all rows in A where depature_time is between the date_begin and date_end of the season...

      And I don't know how to interrelate these 2 tables ? In the script ? In the graphic view ?


      Thank you in advance for your help.

      My bests,

      Quy Thanh