Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Imbue20
Contributor
Contributor

Display initial 5k records in the table

Hi,

I am having a table with nearly 5M records but since it takes long time to display user asked to show only 5k records initially,  Later on when the user selects any filter like  company code then the records should display accordingly ( even the records are 50k for that selection) . Again when the filter is removed the records should be 5k.

Please help me out to achieve this !!

Labels (4)
6 Replies
vinieme12
Champion III
Champion III

if this table is only being used to download data, then I would just you minimize the entire table

this way the table data will be loaded but the time it takes to render the data will be avoided, the user can just right click on the minimized table and export as usual

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Imbue20
Contributor
Contributor
Author

Okay, but isn't there any way  where I can show initial 5000 records out of all 5M records in the table .?

vikasmahajan

Hi,

you can give first command see syntax 

Sales_Fact :
first 5000
LOAD

"Month",
//TransactionDate,
TransactionDate as Trndate,
num(TransactionDate) as AsOfDate,
"MonthName",
MonthYearNum,
month_name,
"year",
quarter_name,
monthstart_date,
monthstart_date_num,
Sales,
Units
FROM [$(vSharedTransformQvds)SALES_FACT.qvd] (qvd);

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
BrunPierre
Partner - Master
Partner - Master

The first prefix to the load statement will only pull 5000 records into the model. But I believe your requirement is to filter at the front end. If so then, I would do something like this

Script

Data:

Load * ,

RowNo() as reocrdCount

From MainTable;

Expression

Sum(if(reocrdCount <= 5000,YourMeasure)) //aggregation of your measure to display initial 5000 records

 

 

Imbue20
Contributor
Contributor
Author

Thanks Peter, you caught my requirement.

But unfortunately my table doesn't contain even one single measure, all are dimensions.

Then what should be the case .?

( And i need to enter this logic in data handling Right ?)

 

BrunPierre
Partner - Master
Partner - Master

Provide some sample data.