Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interval Match for multiple dates

Hi All,

I am facing issue in interval match for having multiple dates in fact table.

I have one table in which start date and end date and in second table there are two dates which i have to identify in which range they comes. But interval match as create synthetic key for single date and for more than one date even it is creating loop and synthetic key.

Attached the sample data for reference with output.

   Tab1:


  

PIDPhaseStart_DateEnd_Date
A1Q14/1/20164/7/2016
A1Q14/8/20164/15/2016
A1Q14/16/20164/22/2016
A1Q14/23/20164/30/2016
A1Q25/1/20165/14/2016
A1Q25/15/20165/21/2016
A1Q25/22/20165/28/2016
A1Q25/29/20166/4/2016

Tab2:


    

PIDPhaseActualDatePlannedDatePartID
A1Q14/4/20164/5/2016P1
A1Q14/6/20164/7/2016P2
A1Q14/11/20164/12/2016P3
A1Q15/2/20165/5/2016P4
A1Q25/16/20165/16/2016P2
A1Q25/18/20165/23/2016P3
A1Q25/19/20165/19/2016P1
A1Q25/27/20165/19/2016P2

Output:

    

PIDPhaseStart_DateCount(PID) by ActualDateCount(PID) by PlannedDate
A1Q14/1/201622
A1Q14/8/201611
A1Q14/16/201600
A1Q14/23/201600
A1Q25/1/201600
A1Q25/15/201632
A1Q25/22/201611
A1Q25/29/201600

Thanks in advance.

Sumita Chawla

2 Replies
regowins
Creator II
Creator II

Not sure but this may help... Re: Heat map - Length of Stay for 24 hr

sudeep_d
Partner - Creator
Partner - Creator

Hi Sumita,

PFA .

Sudeep.