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

Divide number of records in list box

Hi All,

I am not sure if it is a right way to ask this question or not but I am just wondering if there is a way to divide the records of a field in various parts and create some buttons to show First 1 Million records, Second 1 Million records and Show All for example.

I have a field IP Address and I have more than 6 million records in that. If I leave to lead and process all 6 million records then it is taking too long. What I want is to divide 6 million in 6 parts one million each and then create buttons to show First 1 million, Second Million and so on. One button for to show all.

Help will be highly appreciated.

Thanks,

TA

11 Replies
whiteline
Master II
Master II

Hi.

I explain you both.

div(rowno(), 100)  as Group

1) rowno() - gives the number of row in the loading table (the original order as it was in input file).

    div() - returns the integer part of the result of the arithmetic division.

    so for rows 0-99 the above expression returns '0', for 100-199 - '1', and so on.

Obviously, you can add +1 after div() to start group name from 1.

div(num#(subfield(IPAddressString, '.', 1)), 😎

2)  subfield([IP Address], '.', 1) - returns the part of string with first number of IP address (0-255).

     num#() - converts the string to number.

     div() - look above.

Obviously, you should get about ~30 groups (=256/8) with group names depending on the first number of IP address. The group name here is just the first number of IP address divided by 8.

So first - groups IPs just by row number in an original file, second - by first number of IP.

Not applicable
Author

Hi Jagan,

I tried to apply your solution in one of my other report but its not working. I am not sure about how you set the variable in the actions for Next Page and Previous Page. I think that piece is causing the problem.

Thanks,

TA