Skip to content

Paging

Paging is a concept used in Qlik Sense to allow access to selected parts of data tables.

The number of table rows returned by hypercubes and list objects can in many case become very large, and it will often be impractical to retrieve all cells of the table in a single call to engine. A typical application of paging would be to populate a list box in a GUI. The GUI can know up front how many rows it will be able to display, and scrolling through a list box containing millions of rows could quickly suffer from performance problems unless a paging strategy is implemented.

The structure NxPage is used to define a page. The structure contains the properties Top, Left, Height, and Width, which together define a rectangle of cells within a table. For instance, NxPage structures are provided as arguments to the engine for methods that get data from hypercubes and list objects, and those methods return data in the form of NxDataPage structures. The NxDataPage structure contains a matrix representing the rows and columns of the data returned as well as metadata concerning the data that was returned.

The methods provided by the engine (for instance GenericObject.GetData) take lists of pages as arguments, which makes it possible to retrieve multiple pages in one call. A typical application of this is to get both the first and the last few rows of a table to make it possible to implement a smooth scrolling behavior in a component that allows scrolling to wrap around to the top.

Example: Get the second and third row from the table below

NxPage to use: { Top = 1, Left = 0, Height = 2, Width = 3 }

Result

YearMonthSum(Sales)
2014February101412
2014March90233

Example: Get Month and Sales (but not Year) from the first 5 rows of the table below.

NxPage to use: { Top = 0, Left = 1, Height = 5, Width = 2 }

Result

MonthSum(Sales)
January101235
February101412
March90233
April128923
May154321

Example: Get the first 2 and last 2 rows of the table below.

NxPages to use: [{ Top = 0, Left =0, Height = 2, Width = 3 }, { Top = 14, Left =0, Height = 2, Width = 3 }]

Result

YearMonthSum(Sales)
2014January101235
2014February101412

Result

YearMonthSum(Sales)
2015March112455
2015April105567

Example: Source data

DimensionsMeasures-
YearMonthSum(Sales)
2014January101235
2014February101412
2014March90233
2014April128923
2014May154321
2014June112552
2014July192134
2014August90213
2014September90576
2014October90227
2014November106311
2014December112394
2015January145621
2015February174566
2015March112455
2015April105567

See also:

.Net SDK API: Paging of data

Was this page helpful?