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: 
jbotheguy
Contributor
Contributor

Calculate share of the customers who sell the most.

Hello Community, 

I am needing your help to be able to perform the following calculation.
I have a table in the datamodel (Sales) with the number of products sold by a company.
I also have a table of Products and another of Companies.
I would like to be able to calculate in a table in the interface what percentage of sales corresponds to the 10 companies that sell the most of each of the products.
Therefore, for each of the products there could be 10 different companies.
As a last point, I would be interested in it being calculated ignoring the selection of the Company_Name field.

Thanks in advance.

 

Commercia_Question.png

Labels (1)
1 Reply
MatheusC
Specialist
Specialist

Hi, @jbotheguy 

You can try this:

sum({<product={"=rank(sum(sales),4)<=10"}>}sales)

Generating the rank of your top10 and for the percentage just divide by the total sale
Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!