Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
double7671
Creator
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
brunobertels
Specialist II
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 :

View solution in original post

3 Replies
vikasmahajan
Champion
Champion

Hope Attached application help See Bottom


Vikas

brunobertels
Specialist II
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 :

View solution in original post

double7671
Creator
Creator
Author

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