cancel
Showing results for 
Search instead for 
Did you mean: 

Change sorting order of date filed in pivot column

tsaho8
9 - Travel Pro
9 - Travel Pro

Hi @Angelina_QBeeQ ,

Could you please assist me how to sort date field from column section in pivot table. I want the latest month first and so on. 

tsaho8_0-1681310492910.png

 

1 ACCEPTED SOLUTION

Helena_qbeeq
9 - Travel Pro
9 - Travel Pro

Hi @tsaho8 ,

The following script could work for your case. 
Depending on the number of rows and columns, you might have to tweak the index number it to make it work. 
Assuming a simple pivot table, with just one row dimension and one column dimension:

widget.on("buildquery", function(se,ev) {
	ev.query.metadata[1].jaql["sort"]="desc";
})

 

Please let me know if this works for you : )

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

View solution in original post

1 REPLY 1

Helena_qbeeq
9 - Travel Pro
9 - Travel Pro

Hi @tsaho8 ,

The following script could work for your case. 
Depending on the number of rows and columns, you might have to tweak the index number it to make it work. 
Assuming a simple pivot table, with just one row dimension and one column dimension:

widget.on("buildquery", function(se,ev) {
	ev.query.metadata[1].jaql["sort"]="desc";
})

 

Please let me know if this works for you : )

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