Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum of top 5

Hello,

I have data representing the Sales by Products, by Companies.

I would like to create a chart to show for each Product total Sales made by top 5 Companies for that specific Product. Also I would like to calculate and display the percentage that total Sales made by top 5 Companies represent out of total Sales for that product (all Companies).

ProductSales Top 5 CompaniesTop5/Total
Product A150025%
Product B300010%
Product C800080%
Product D20003%

Please can you help with correct expressions for the chart columns?

The expression i have used for Sales Top5 Companies is sum( {$<Company>={"rank(aggr(sum(Sales),Company))<=5"}>} Value) but as far as I could see is correct only if single Product is selected.

Thanks!

Carmen

2 Replies
Not applicable
Author

If you have a sum expression you can use dimension limits, you can set the limitation to select the top 5 or top 10 or bottom 5 etc, in QV 11 you can be even more specific. this will produce the answers you are looking for.

Hope this helps?

Thanks Steve

Not applicable
Author

Hi Steve, thanks for the reply.

Client wants a chart such as in my previous example, in order to be able to depict products for which more than 80% of the sales are made by only 5 companies.

I've tried to use dimension limits but in this case I am only able to display value of sales for each  company from top5 but I cannot calculate the percentage ( sales made by top5 companies/ sales made by all companies)

I hope I was able to explain more clear what I need.

Thanks,

Carmen