Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
harson
New 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

Re: Load data into a temporary table

Try this?

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

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
harson
New Contributor III

Re: Load data into a temporary table

Anil,

I think you did not read my post well

Re: Load data into a temporary table

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.
Partner
Partner

Re: Load data into a temporary table

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

Highlighted

Re: Load data into a temporary table

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

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)