Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I correct this intervalmatch?? Please Help!

Hi all, got a problem with an interval match I'm trying to use, it looks like this:

LOAD Fiscal_Year,

Period,

Period_Start,

Period_End

FROM

PeriodCalendar.qvd

(qvd);

LOAD "incident_id",

"date_logged";

SQL SELECT "incident_id",

"date_logged"

FROM AssystLiveBS.dbo.incident;

IntervalMatch (date("date_logged"),'dd/mm/yyyy') select Period_Start, Period_End from PeriodCalendar.qvd (qvd);

However it doesnt function, any ideas why?

All help very gratefully received!

3 Replies
pover
Luminary Alumni
Luminary Alumni

According to the help, the syntax is intervalmatch (field), so try changing the date format of date_logged in the load statement and not in the intervalmatch function. The intervalmatch function should be just

intervalmatch(date_logged) load Period_Start, Period_End from PeriodCalendar.qvd (qvd);

Regards.

Miguel_Angel_Baeyens

Hi Ben,

I'd try as follows

RangesTable:LOAD Fiscal_Year, Period, Date(Period_Start, 'DD/MM/YYYY') AS Period_Start, Date(Period_End, 'DD/MM/YYYY') AS Period_EndFROM PeriodCalendar.qvd (qvd); FactsTable:LOAD "incident_id", Date("date_logged", 'DD/MM/YYYY') AS Date;SQL SELECT "incident_id", "date_logged"FROM AssystLiveBS.dbo.incident; FactsAndRanges:INTERVALMATCH (Date) LEFT JOIN LOAD Period_Start, Period_EndRESIDENT DatesTable;LEFT JOIN (FactsTable) LOAD * RESIDENT RangesTable; DROP TABLE RangesTable;


Hope that helps!

Not applicable
Author

Everything looks good except this strange conversion

IntervalMatch (date("date_logged"),'dd/mm/yyyy')


Because of the syntax error the whole sentence is just ignored by loader. And it will be better to make this conversion in initial data load statement, like this:


LOAD Fiscal_Year,
Period,
Period_Start,
Period_End
FROM
PeriodCalendar.qvd
(qvd);

LOAD "incident_id",
date("date_logged",'dd/mm/yyyy') as date_logged;
SQL SELECT "incident_id",
"date_logged"
FROM AssystLiveBS.dbo.incident;

IntervalMatch ("date_logged") select Period_Start, Period_End from PeriodCalendar.qvd (qvd);