Qlik Community

Qlik Sense App Development

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

double7671
Contributor

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%
Tags (1)
1 Solution

Accepted Solutions
brunobertels
Valued Contributor

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

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
vikasmahajan
Honored Contributor III

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

Hope Attached application help See Bottom


Vikas

brunobertels
Valued Contributor

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

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 :

double7671
Contributor

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

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