Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nkosinde13
Creator
Creator

Sorting a pivot

Good day community

I have another challenge where I need to sort a pivot table using expressions. I know this works in a straight table and not a pivot. I've looked through the Qlikview pages and I cant seem to find any example that is easier to understand. So basically what I want is that a selection of a list box needs to sort the pivot table on expression. Currently the selection  shows and hides the table, meaning I have 5 different pivot tables that show and get hidden depending on the selection. So I want the same selection to also sort the table by expression when it gets displayed e.g. If  a user selects Budget Var %, the chart needs to sort by Budget Var % column either ascending or descending.  Also note that the expressions are Cyclic as well.

Please see the attached screenshot for details and any help is greatly appreciated.

Thanks

Matlotlo

Capture.PNG

4 Replies
florentina_doga
Partner - Creator III
Partner - Creator III

in tab sort

biff expresion

 
nkosinde13
Creator
Creator
Author

Hi Florentina

Thank you for the quick response.

kindly note that I did put in the expression on Sort tab but it's not working. My expression is as follows and this is exactly what I put on sort tab: Or do you mean I should modify the expression  on sorting to something else? 

Sum({<$(eSetFYTD_CN)>}Amount) / $(ThouMenu)

/

(Sum(Budget) / $(ThouMenu))
 

Thanks 

Matlotlo

atoz1158
Creator II
Creator II

Hi

I found that I needed to wrap the Expression inside the AGGR() function using the dimensions of the Pivot table.

Give that a try.

Regards

Adrian

Brett_Bleess
Former Employee
Former Employee

Matlotlo, did Adrian's post help you get things working as you wish?  If so, do not forget to come back and give credit by using the Accept as Solution button on the post and to let others know things did work.  If you still need further help, leave an update on where you are with things.

Here is a Help link that may be helpful in this case regarding the AGGR function Adrian mentioned, it may help you get the hang of things if you are still working on them:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.