Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
diffeyj
Partner - Contributor III
Partner - Contributor III

Sorting in pivot tables

hi all,

I have a pivot table for sales by product by period, and the users of this file want to be able to sort by any column. Can this be done in a pivot table? I know you can simply double click on a column heading in a straight table and it will sort on that column, but they want the selected periods to be accross the page, but be able to sort by any column.

I have attached a sample file, it is pretty basic way of looking at it.

Capture.PNG

The chart looks like this.

I hope this all makes sense

Regards

Josh

14 Replies
Not applicable

Hi Ama,

I've only just seen your message (I don't think I received a notification) can you post the workbook in the forum for reference? I'm not 100% sure on what you need to achieve?

If I fail to respond, please contact me directly: richard.hemmings at bluevenninc dot com

Rich

Not applicable

Found the answer

Use the Dual function... it should go as below for the Dimension

=Dual(Product,aggr(sum(Sales), [Products]))

Hope this helps.

paolo_mapelli
Creator II
Creator II

Doesn't works for me.

Anonymous
Not applicable

Works really well,

I would like to set up a default sorting if nothing is selected. Any idea how to do it please?

Something like:

IF(  COUNT( %DisplayValue) <> 1,

          by_default_sorting,

          $(=(%SortingExpression) )

)


Thanks

colinodonnel
Creator II
Creator II

The following solution  by gwassenaar‌ worked for me perfectly:

Is it possible to sort measure in pivot table using Qlik Sense?