Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Nemo1
Creator II
Creator II

Challenges I am having when creating a Pareto graph

Hello everyone, 

I have just asked the same question but explaining the issue with my own words (english is not my first language, so it is not that easy for me to be clear). 

I asked ChatGPT to help me be a litle bit clearer. Here is the following:

 

  1. Graph Description: I want to create a graph, specifically a Pareto chart, that categorizes cities based on their percentage contribution to total sales (%Acc Sales).
  2. Categorization Criteria: I plan to classify cities into three categories:
    • Category 1: The top 10% of cities with the highest sales.
    • Category 2: The next 20% of cities after the top 10%.
    • Category 3: The remaining cities (approximately 70%).
    •  
    • Data Organization:
    • The x-axis will represent cities sorted from highest to lowest sales (descending order).
    • The y-axis will represent the cumulative percentage of sales (%Acc Sales).
  1. Challenges:
    • The x-axis sorting is showing the Cities in a descending order of sales, but you cannot see the separation between the categories (1,2 and 3 respectivally). I am failing at representing the boundaries between the three categories on the graph.
  1. Specific Requests:
    • I want to add lines on the graph to indicate where each category starts on the x-axis.
    • Additionally, you'd like to label these lines to show the percentage of total sales each category represents

Here is how my graph looks like right now:

Nemo1_0-1708331230735.png

 

here is want i want to have:

Nemo1_1-1708331246493.png

 

 

thanks everyone in advance. i love this community.

 

 

 

Labels (4)
1 Reply
LRuCelver
Partner - Creator III
Partner - Creator III

LRuCelver_0-1708434383745.png

Here is the data and all expressions used:

Data:

Data:
NoConcatenate Load 
	Chr(RecNo() + Ord('A') - 1) as City,
    Rand() * Rand() * Rand() * 1000 as Sales
AutoGenerate 26;

Dimension:

=Aggr(Dual(City, Rank(Sum(Sales))), City)

Measure:

=RangeSum(Above(Sum(Sales), 0, RowNo())) / Sum(total Sales)

Dimension reference lines:

=Ceil(Count(distinct City) * 0.1) // Replace 0.1 with whatever percentage you want

Measure reference lines:

=Sum(Aggr(If(Rank(Sum(Sales)) <= Ceil(Count(distinct total City) * 0.1), Sum(Sales)), City)) / Sum(total Sales) // Replace 0.1 with whatever percentage you want

 

I hope it helps.