Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.