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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to select the first 10 entries of table?

Hello,

for the last days i try to select the first 10 entries of a table, with a macro, but i doesn't work. Can anyone give me some tips

thanks for the time

5 Replies
Miguel_Angel_Baeyens

Hello Arne,

You can load 10 lines of table in script with

Table:Load Field1, Field2Resident OriginalTable Where RowNo() < 10;
Hope it helps!

Not applicable
Author

Thank you for the fast response

Sry for the missunderstanding, but i want only to select 10 items. Not to load only 10 items.

i want to make 3 Buttons with this functionality:

1)"Top10" select the top 10 items

2)"Top30" select the top 30 items

3)"All" select all items in the Table

deepakk
Partner - Specialist III
Partner - Specialist III

HI,

We can use the Rank Function to get the desire result.

I hope the attach applicatio helps you out.

Not applicable
Author

hi ,

u can first load rowno() as rownumber in your script and then you can write the following code as a macro

sub range

mySelect= ">=1" & " <=10"

ActiveDocument.Fields("rowno").Select mySelect

end sub



and then use this macro as an action for the button "top10"

similarly for "top20" button

write mySelect= ">=1" & " <=20" in the above macro

and so on for top 30...

thanks

Not applicable
Author

Thank you all.

I will test your solutions and will response to it soon as i can.