Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
renuka_sasikumar
Creator III
Creator III

Merging Two Calendar

Hi,

I have Calendar Master, Sales, Service in Data Model where each n every tab is linked with Common Date.

But Even I have one Excel file where the fields are

LOAD SOrg. as SalesOrg,

     DChl as Dist_Chnl,

     Dv as Division,

     Year,

     Cycle,

     Floor([Valid from]) as StartDate,

     Floor([Valid to]) as EndDate,

     [Reporting Month],

     [Cycle Type]

FROM

(ooxml, embedded labels, table is Calendar);

From this Table I want to link wid the previous table How do i go about it.

Once wen I select any Date field its should pick from this excel and show the result according to it.

Thanks & Regards,

Renuka S

3 Replies
er_mohit
Master II
Master II

use interval match functionality and also using either join or left join this table to previously loaded table

vikasmahajan

Use interval MAtch as per Mohit said pfa sample

Tab1:

LOAD PROD_CODE,

     PROD_BATCH,

     SG_ID,

     LOCCODE,

     date(EFFDATE,'DD/MM/YYYY') AS EFFDATE

FROM

rate_updation.xlsx

(ooxml, embedded labels, table is BatchMaster);

Tab2:

LOAD

     PROD_CODE,

     PROD_BATCH,

     PB_NBR,

     date(PB_EFF_FROM,'DD/MM/YYYY') AS PB_EFF_FROM,

     date(PB_EFF_TO,'DD/MM/YYYY') AS PB_EFF_TO

FROM

rate_updation.xlsx

(ooxml, embedded labels, table is RateMaster);

// where  PB_PRICETYPE='P' and PB_ACTIVE=1 ;

MatchTable:

IntervalMatch (EFFDATE,PROD_CODE) //Match date first, then key(s) keys are now both in here

LOAD

    DISTINCT

     PB_EFF_FROM , //First two fields have to be the from date then the to date

     PB_EFF_TO  ,

     PROD_CODE

Resident Tab2;

//Once the dates are matched, you can join other data onto the result of the interval match via the match date and the keys

Join (MatchTable)

LOAD

     PROD_CODE,

     PROD_BATCH,

   // PB_PRICETYPE,

      PB_NBR,

     PB_EFF_FROM,

     PB_EFF_TO    

Resident Tab2;

DROP Table Tab2;

DROP Table Tab1;

Hope this help you

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
MayilVahanan

Hi

Please refer this

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.