cancel
Showing results for 
Search instead for 
Did you mean: 

Reorder columns in pivot table

gyanianand
8 - Cloud Apps
8 - Cloud Apps

Hi Team,@Angelina_QBeeQ

I want to order the weeks displayed in below pivot in desc order i.e latest week first and so on.

Also how to hide the "Header" word....i need the column but the column header should be blank.

Please help !!

gyanianand_0-1684134616028.png

 

1 ACCEPTED SOLUTION

Angelina_QBeeQ
10 - ETL
10 - ETL

Hi @gyanianand ,
If you want to reorder rows/columns, use the script below:

widget.on('buildquery', function (se, ev) {
	ev.query.metadata[3].jaql["sort"] = "desc"; // [3] add here the index of your query
});

The sample with result and query index here:

Angelina_QBeeQ_0-1684230686412.png

To hide the column header, you can change the cell value:

widget.transformPivot(
	{},
  function (metadata, cell) {
    if (metadata.colIndex == 0 && metadata.rowIndex == 0) {
      cell.content = ' '
    }
  }
);

Always here to help,
Angelina from QBeeQ
[email protected]
QBeeQ  - Gold Implementation and Development Partner

View solution in original post

2 REPLIES 2

Angelina_QBeeQ
10 - ETL
10 - ETL

Hi @gyanianand ,
If you want to reorder rows/columns, use the script below:

widget.on('buildquery', function (se, ev) {
	ev.query.metadata[3].jaql["sort"] = "desc"; // [3] add here the index of your query
});

The sample with result and query index here:

Angelina_QBeeQ_0-1684230686412.png

To hide the column header, you can change the cell value:

widget.transformPivot(
	{},
  function (metadata, cell) {
    if (metadata.colIndex == 0 && metadata.rowIndex == 0) {
      cell.content = ' '
    }
  }
);

Always here to help,
Angelina from QBeeQ
[email protected]
QBeeQ  - Gold Implementation and Development Partner

Thanks a lot for this help Angelina!!