Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
robertbrooks
Contributor II
Contributor II

Iterate through Date Values

I need to determine the difference between Report Date and Begin Date for every possible combination of Report and Begin Dates. Based on the result I will create a dimension field that identifies the difference in each row as either greater than or less than 90.

How do I script this in the load statement to create the Desired Results Table shown below?

 
 
 

 

SSS screenshot.png

 

 

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
dwforest
Specialist II
Specialist II

[TempDates]:

LOAD ReportDate

FROM Table1;

JOIN

LOAD BeginDate

FROM Table2;

Because there are no matching fields to join you will get a cartesean product.

[FinalDates]:

LOAD

ReportDate, BeginDate, ReportDate-BeginDate as BucketDim

RESIDENT [TempDates];

DROP TABLE [TempDates];

 

View solution in original post

2 Replies
dwforest
Specialist II
Specialist II

[TempDates]:

LOAD ReportDate

FROM Table1;

JOIN

LOAD BeginDate

FROM Table2;

Because there are no matching fields to join you will get a cartesean product.

[FinalDates]:

LOAD

ReportDate, BeginDate, ReportDate-BeginDate as BucketDim

RESIDENT [TempDates];

DROP TABLE [TempDates];

 

robertbrooks
Contributor II
Contributor II
Author

Thank you very much! This worked perfectly.