Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with QVD load

I'm trying to extract out of SAP. I have two date fields in my table. One is 'Snapshot week' and the other is 'Calendar Week'

For one Snapshot week, I have historical forecasts (-1, -2, -3 and so on) and then I have future forecasts where (1,2,3,4 and so on)

So if my snapshot week was 9/1/2014, the historical forecast would include 8/25, 8/18, 8/11, 8/4 and so on

and the future forecast would have 9/1/, 9/15, 9/22, 9/29 and so on.

I want to limit the load so that it only brings in current snapshot week and 10 weeks of historical forecast data. This is what I have so far but it doesn't bring in any historical forecast data....so any idea on how to bring in the historical 12 weeks of forecast data?

SQL Select *  from SAP_Table

Where /[Snapshot Week] = 201439;

STORE * FROM SAP_TABLE INTO $(vRootPath)\Data\QVDs\Forecast.QVD;

Labels (1)
2 Replies
richard_chilvers
Specialist
Specialist

I'm not an expert in this area, but I would use a slightly different format:

SAPTableQV:

LOAD *;

SQL SELECT * FROM SAP_Table WHERE  etc....;

STORE SAPTableQV INTO .......;

This way your QV table holds your filtered data and all be saved using STORE.

Regards

Not applicable
Author

I think I would need to use some kind of min or max date function here... I have no idea how to approach this.

Anyone have any other ideas?