Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Pareto - accumulated sum - sorting issue

Hi All,


I am working on Complaints analysis.  For some of the reasons it doesn't work for me. I have an issue on the very beginning with sorting order. 

When I follow instruction and create Pivot Table, setup sorting order as below



My result you can see in table below.

Second column expression =Sum(Complaint_Value)

Third Column expression =RangeSum(Above(SUM(Complaint_Value), 0, RowNo()))

Complaints Type=Sum(Complaint_Value)Accumulated Complaints
type 1563601
type 242643
type 33838
type 433703
type 527670
type 611724
type 710713


When I change sorting order as below:




Results are different but still incorrect:

Complaints Type=Sum(Complaint_Value)Accumulated Complaints 
Type 13838 
Type 2563601 
Type 342643 
Type 427670 
Type 533703 
Type 610713 
Type 711724 


Could you please advise? I have no more ideas how to solve this issue


Thank you

Best Regards


3 Replies

Re: Pareto - accumulated sum - sorting issue

I think you need to check 'Expression' as your sort option (3rd down, 2 above Numeric Value from your last screen shot) and enter the expression - Sum(Complaint_Value) - and check Descending.
Specialist II
Specialist II

Re: Pareto - accumulated sum - sorting issue

In the sorting tab under the expression , use  RangeSum(Above(SUM(Complaint_Value), 0, RowNo())) for your sort  if you are looking to sort based on the accumulation . when you select sort based on Y-Value it takes the first expression for the sort which is why you got the sorting of the first expression correctly  


Re: Pareto - accumulated sum - sorting issue


When you sort by "Y-Value" in a pivot table, it is sorted following the first expression. Said so, you may switch to straight table so you can sort the chart by any of the columns (I don't see the need of a pivot table in your example so, if you can use a straight table I would do it).

If you need to keep using a pivot, you can create a first column to sort the table (with "RangeSum(Above(SUM(Complaint_Value), 0, RowNo()))" in your case) and then completely hide the column (you can achieve this with a macro).

Let me know if this helps!