Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Linking dates - Newbie

Hi

Please excuse me as I am quite new to Qlikview, and a bit of a novice.

I have 2 data sources.  The first one is from a forecast database, and the second is from a actual database.  Each one of these are by 15 minute interval.  I have managed to bring in data by interval from the forecast without a problem.  I can also bring in data by interval from the actual database.  However I am unable to bring in both together to link on the timestamp.  i.e.  When I cange the selection for the forecast date, the actual data still keeps the overall total (is unchanged).

The tables I have are as follows :

Forecast Group Table - Shows forecast group id / forecast group name

Forecast Table - Shows forecast name / forecast id

Forecast data Table - forecast data by timestamp

forecast group / forecast table - has forecast id & forecast group id (to link the 2 tables)

Actual group table - shows actual group id / actual group name (same as forecast group name)

Actual table - shows actual name / actual id

Actual data table - shows actual data by timestamp

I have attached the table view.

Any help appreciated

Phil

1 Reply
Employee
Employee

Re: Linking dates - Newbie

I do not understand your data well enough to give you a detailed answer, but generally I can say that in cases like this my experience is that both the Actual and the Forecast should be loaded into the same fact table, using as many common keys as possible. Otherwise you will get a very complex data model with many composite keys. The principal script would then look like

Facts:
Load

FromDate & '/' & ToDate as IntervalID
,
ApplicationName
,
null() as ForecastName,


from Actual ... ;

Concatenate

Load
StartDate & '/' & EndDate as IntervalID,
null() as ApplicationName
,
ForecastName,


from Forecast ... ;

But of course you probably need to transform and massage data – both Actual and Forecast – before you can create the fact table.

Community Browser