Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Patreson31
Contributor II
Contributor II

Populating and smoothing timeseries data - Qlikview

Hi all,

I'm trying different approaches to generate a single data point by half hour from multiple tables but am really struggling and wondered if anyone would be kind enough to help. 

The problem is some tables have the data coming in every hour - like this:

Patreson31_0-1587998710389.png

Others have multiple points per half an hour period, like this:

Patreson31_1-1587998762976.png

Ultimately I'd like to infer the half hourly points and join tables B and C into a single table in the script. 

I've spent a while on this problem and can see how to do this  in other environments such as python or even excel but in Qlikview it seems really tricky - unfortunately all my upstream transformation is in Qlikview so I need to be able to handle this in script.

 

Thanks for any help!

Labels (2)
1 Reply
Patreson31
Contributor II
Contributor II
Author

Attempted an approach I found in a document kindly shared by a contributor but to no avail, don't know if anyone can see something wrong with the following:

//Iterate for half hourly range
Temp_TableB:
load
DateTime as DateTimeRefined,
[GtbPower] as B
Resident GtbPower;
//Additional Step at Peek step
Drop Table GtbPower;

Join(Temp_TableB)
LOAD
//date((TimeStamp($(vMinDate) + (RecNo()/48) + (IterNo() -1))), 'DD/MM/YYYY') AS TempDate,
TimeStamp($(vMinDate) + (RecNo()/48) + (IterNo() -1)) AS DateTimeRefined
AUTOGENERATE 48 WHILE Num($(vMinDate) + IterNo() -1) <= Num($(vMaxDate));

BV2:
NoConcatenate Load DateTimeRefined as DateTimeV2,
If(IsNull([B]),Peek([B]),[B]) as BV2
Resident Temp_TableB
Order By DateTimeRefined; 

Drop Table Temp_TableB;

Produces this, so still quite a bit off:

Patreson31_0-1588091274158.png