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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
g_bolshakov
Contributor III
Contributor III

Get all pivot table data

Hello colleagues!

I am developing my own pivot table extension. Faced the problem of getting complete data.

If I create a regular table, then I use the following construction:

 

var qTotalData = [];

var totalrow = this.backendApi.getRowCount(),
    columns = hc.qDimensionInfo.length + hc.qMeasureInfo.length,
    pageheight = Math.floor(10000 / columns);

var lastrow = 0, me = this;

this.backendApi.eachDataRow( function ( rownum, row ) {
    lastrow = rownum;
    qTotalData.push(row)
});

if (totalrow > lastrow + 1) {
    var requestPage = [{
        qTop: lastrow + 1,
	    qLeft: 0,
	    qWidth: columns,
	    qHeight: pageheight
    }];

    this.backendApi.getPivotData( requestPage ).then( function ( dataPages ) {
        me.paint( $element, layout );
    });
}

 

But this method does not work with pivot tables.

I found that there is a getPivotData method, but I don't know how to use it to get all the data in the pivot table.

The eachDataRow method does not return anything (does not work as I expected) and I cannot redraw the extension, hence the lastrow does not increase.

 

Any ideas on how to get complete data on a pivot table?

Thank you in advance for your help

 

With respect George.

Labels (2)
0 Replies