Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to limit the amount of data loaded into

I need some urgent help on how to limit the amount of data loaded into QlikView? The large amunt of data causing Out of memory when try to load a report within QlikView.

 

Example, I would only want to limits 5 years of data load into QlikView with condition if one of the fields is check within the table then load all data. If the box is not check, then only display data for the last 5 years.

Is this possible? if so, how to accomplish this? Thanks in advance...

10 Replies
albertovarela
Partner - Specialist
Partner - Specialist

You could run it using the limit load option on the debugger or precede your load statement with First nn (where n is number of records) or filter your data with a where clasue

albertovarela
Partner - Specialist
Partner - Specialist

Sorry for the incomplete answer... supposing you have a year field in your table

:

Field1,

Field2,

Year

From Table.qvd (qvd)

where year >= 2009;

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can use where condition in Load statement to restrict the data, please check below example to load last 5 years data

LOAD

*

FROM DataSource

WHERE DateDimensionName > YearStart(DateDimensionName, -4);

Note: Replace DateDimensionName  with your actual fieldname and DataSource with your actual data source;

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thank you all for all your feedback.

However, if i want to display last 5 years data with condition where a specific check box or field IS NOTchecked.

And if that field or box is check, i will need to load all data regardless. Is this possible?

Thanks in advance....

Suzanne

Not applicable
Author

what is the field (not checked means)

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Suzanne,

typically I'd do this with a variable.

Set up a variable in your application called vLimitedLoad.

Then in your script:

if vLimitedLoad = 1 then

     Data:

     LOAD *;

     SQL SELECT * FROM DataTable Where Year > 2009;

else

     Data:

     LOAD *;

     SQL SELECT * FROM DataTable;

endif

Not applicable
Author

sorry for the confusion....

for example, i have a field name credit limit 'never expired' and it's a checkbox.  So if the check box is check means it's never expired.

So i need to bring in all data if that box is checked.

For those reviews where that box is not check, i need to load 5 years of data only.

Hope this make sense...

albertovarela
Partner - Specialist
Partner - Specialist

Do you know the what's the value when the never expired checkbox is selected? do you know the field name? Also what's the date field you want to filter on?

Not applicable
Author

Hi,

If you want only last 5 years data use this

LOAD

*

FROM Table

WHERE Date > YearStart(Date, -4);

Or else if you want only first 5000 records use

Tab1:

First 5000 load * from

                                 Tablename;