Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

skoppe
New Contributor II

Split 1 hour record into 4 quarter records

Hi all,

I have a problem, for a report I'm loading certain datavalues per hour:

YearMonthDayTimeDescValue
20136258:00:00testvalue28,31596

I would like this to be 4 quarter (15 minutes) records with the same value, but I don't have a clue how to get this. I guess this must be done while loading in the script. This is the result that I need:

YearMonthDayTimeDescValue
20136258:00:00testvalue28,31596
20136258:15:00testvalue28,31596
20136258:30:00testvalue28,31596
20136258:45:00testvalue28,31596

The difference is in the Time field.

Anyone can help me?

Thanks in advance!

Regards,

Stefan

1 Solution

Accepted Solutions
Luminary
Luminary

Re: Split 1 hour record into 4 quarter records

Hi,

Create another table that has each "hour" time and each "quarter" time - like this:

Hour, Quarter

08:00:00, 08:00:00

08:00:00, 08:15:00

08:00:00, 08:30:00

08:00:00, 08:45:00

Then left-join that table to your data.  It will now create 4 "rows" for each fact row.

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

2 Replies
Luminary
Luminary

Re: Split 1 hour record into 4 quarter records

Hi,

Create another table that has each "hour" time and each "quarter" time - like this:

Hour, Quarter

08:00:00, 08:00:00

08:00:00, 08:15:00

08:00:00, 08:30:00

08:00:00, 08:45:00

Then left-join that table to your data.  It will now create 4 "rows" for each fact row.

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

skoppe
New Contributor II

Re: Split 1 hour record into 4 quarter records

Thanks, I was obviously thinking far too difficult :-)

Regards,

Stefan