Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Pareto - accumulated sum - sorting issue

Hi All,

community.qlik.com/t5/Qlik-Design-Blog/Recipe-for-a-Pareto-Analysis/ba-p/1468497

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

clipboard_image_0.png

 

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:

 

clipboard_image_1.png

 

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

Michael 

3 Replies
Specialist
Specialist

Re: Pareto - accumulated sum - sorting issue

Hi,
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.
Cheers,
Chris.
Highlighted
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  

Highlighted
Partner
Partner

Re: Pareto - accumulated sum - sorting issue

Hi!

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!

Jaime.