Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interval Match Not quite working!!

Hi All

I have, mostly using info from the community managed to build a table using Interval Match I do get a table but for some reason it is called TempDateIM-1 and is a syn table...is this correct?

If not could you please advise a solution for what I am missing?

thanks in advance.

WeeklyCost:

LOAD  dteFromDate,
dteToDate,
intEnrolId,
intPriceItemId,
curBasic,
InvoiceLine.ItemDays,
InvoiceLine.DailyValue


RESIDENT InvoiceLine;

//Keeps minimum and maximum Date value from Invoice Dates Invoice Line table
MinMaxIM:
LOAD
Min(dteFromDate) as MinDateIM,
Max(dteToDate) as MaxDateIM


RESIDENT  WeeklyCost;

LET vMinDateIM = num(makedate(2009,1,1));
//LET vMinDateIM = Num(Peek('MinDateIM', 0, 'MinMaxIM'));
LET vMaxDateIM = Num(Peek('MaxDateIM', 0, 'MinMaxIM'));
LET vToday = $(vMaxDateIM);


//*************** Temporary Calendar *************

//Generates a single table with one field containing all existing dates between MinDate and MaxDate

TempCalIM:
LOAD
Date($(vMinDateIM) + rowno() - 1) AS TempDateIM
AUTOGENERATE
$(vMaxDateIM) - $(vMinDateIM) + 1;

DROP TABLE MinMaxIM;

IntervalMatch (TempDateIM) LOAD dteFromDate, dteToDate RESIDENT WeeklyCost;

DROP TABLE TempCalIM;

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You didn't specify a name for the intervalmatch table so it gets the name of the previous one with -1 appended.

TabelNameHere:

IntervalMatch (TempDateIM) LOAD ...etc

You get a syn table. That's correct and not a problem. Read this blog post for an explanation.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You didn't specify a name for the intervalmatch table so it gets the name of the previous one with -1 appended.

TabelNameHere:

IntervalMatch (TempDateIM) LOAD ...etc

You get a syn table. That's correct and not a problem. Read this blog post for an explanation.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi GysbertThanks for your help novice error I guess!!

One last issue is that I now have 2 tables with no link other than dates, how do I create a single table for the dates and the orginal data from WeeklyCost into one table?

is that possible?

Thanks

David