Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tka_ovako
Contributor II
Contributor II

Time interval with seperate values

Hello.

Is there any chance to get data from two time set. I have table1 that contain times. Then I have another table2 that contains both times and measured values. Now I need to get those measured values somehow so first I get one timestamp from table1 and then compare timestamps with table2. So I need to get values from table2 plus minus 2 minutes compared to table1.

Pretty hard to explain this.

BR.

Timo

2 Replies
swuehl
MVP
MVP

Load your table one and create intervals plus minus 2 minutes for each timestamp:

LOAD

     Timestamp,

     (Timestamp - Maketime(0,2)) as RangeStart,

     (Timestamp + Maketime(0,2)) as RangeEnd

FROM Table1;


Then use IntervalMatch() to match the Table2 Timestamps into the ranges.

felipedl
Partner - Specialist III
Partner - Specialist III

Hi Timo,

You can use intervalmatch to match the timestamp from table 1 to table 2 values.

Table 1 needs to have a start and end timestamp so the table 2 value can be matched.

See https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

for example on how to use it.

Felipe.