# App Development

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for
Did you mean:
Creator

## what is my bottom 5 stores have poor inventory among the top 20 stores in sales?

I am having a business scenario need show some values from a returned set in straight table. A typical question is, what is my bottom 5 stores have poor inventory among my top 20 stores in sales? I only need show these 5 stores names with two columns, one is inventory level, one is sales \$ amt. What is the best way to solve it in Qlik Sense.

I attached a sample excel, the expecting result should be as follows, Thanks.

store namesalesinventory
87716%
282312%
5172616%
2276817%
770318%
1 Solution

Accepted Solutions
Specialist II

Hi

find attached a .qvf app

in a staright table

Dimension Store_name with this mesure

if(aggr(rank(sum(sales)),[store name])<=20 ,[store name])

Limitation set to bottom 5

mesures  :

% inventory :

sum({<[store name]={"=Rank(Aggr(sum(sales),[store name]))<=20"},[store name]*={"=-Rank(Aggr(sum(inventory),[store name]))<=5"}>} inventory)

sales :

aggr(nodistinct if(rank(sum(sales))<=20,sum(sales)),[store name])

it's sorting this :

3 Replies
Champion

Hope Attached application help See Bottom

Vikas

Specialist II

Hi

find attached a .qvf app

in a staright table

Dimension Store_name with this mesure

if(aggr(rank(sum(sales)),[store name])<=20 ,[store name])

Limitation set to bottom 5

mesures  :

% inventory :

sum({<[store name]={"=Rank(Aggr(sum(sales),[store name]))<=20"},[store name]*={"=-Rank(Aggr(sum(inventory),[store name]))<=5"}>} inventory)

sales :

aggr(nodistinct if(rank(sum(sales))<=20,sum(sales)),[store name])

it's sorting this :

Creator
Author

I am using sense, can not tell if the qvw works. Appreciated for your contribution and help.