Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
harson
Contributor III
Contributor III

Load data into a temporary table

Hello Community,

I need help.

My situation :

I have several rows of data for the years 2015,2016 and 2017 in my database while my QlikView report must output a graph every day with the existing data (from 2015 to 2017)
My problem is that loading data from 2015 to 2017 takes a long time.
What I would like to do then, if possible on QlikView, is to load the data from January 2015 to the previous month of the current month for 2017 early in the month.

For example :
On 1 May 2017, I load a temporary table containing the data from 01 January 2015 to 30 April 2017.
Then during the month of May, for my report, I will only reload the data of the month of May, the remains I take them just in my temporary table to avoid reloading the data from 01 Jan 2015 to May 2017 (max date), Since the data from 01 January 2015 to 30 April 2017 no longer change, they are no longer modifiable when we move to a new month.

Thanks in advance for your help.

Tsiry

5 Replies
Anil_Babu_Samineni

Try this?

Create Variable name like vMinDate and the value is =Min(DateField)

LOAD * from DataSource Where DateField >= '$(vMinDate)' and DateField <= Today();

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
harson
Contributor III
Contributor III
Author

Anil,

I think you did not read my post well

PrashantSangle

Hello,

Are you talking about single qvd or complete dashboard?

Have you gone through incremental load concept??

Search on community for incremental load. It will work for you.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ankitaag
Partner - Creator III
Partner - Creator III

Hi Tsiry,

You can first save your historical data in one QVD (HistoryData) and make a separate QVD when fetching current month's data (Current Data).

This way your history remains constant always and just the current month's data will change. Then later concatenate the two QVDs and override the HistoryData qvd.

For ex-


vCurrentMonth=May 2017;


CurrData:

Load *

From table

where MonthYear='$(vCurrentMonth)';

HistoryData:

Load *

From HistoryData

where MonthYear<>'$(vCurrentMonth)';


Store CurrData into [path\HistoryData.qvd] (qvd);


The above condition in 2nd load "'where MonthYear<>'$(vCurrentMonth)';" is required so that when you concatenate and store the data, current month's data doesn't get duplicate.


Hope this helps!


Thanks and Regards,

Ankita

Anil_Babu_Samineni

Do you try atleast? I've removed = for last filter

LOAD * from DataSource Where DateField >= '$(vMinDate)' and DateField < Today();

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful