Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bmutti80
Contributor
Contributor

Show the best seller product in Qlikview

Good morning to all,

I'm trying to show the best seller product among different categories.

I was wondering if it's possible to sum all the sales for each category and then show the product the company should focus on.

I'm trying with an expression like this :

concat(distinct IF(aggr(rank(Sum([Fatturato])), Fatturato )=1,Aggr(rank((Sum([Fatturato])), Prodotto )=1)&CHR(13))

but it's not working.

Does a different solution exist?

3 Replies
olivierrobin
Specialist III
Specialist III

hello,

i find strange this part of the expression :

aggr(rank(Sum([Fatturato])), Fatturato )=

I would try

sum values by product and category

find max valus of each category by using firstsortedvalue

bmutti80
Contributor
Contributor
Author

Thank you for the answer, I tried with this one:

concat(distinct IF(FirstSortedValue(Sum({<Anno={$(vSelAnno)},[LIVELLO 1 - ECR]={'*FRESCO*'}, [Famiglia Az Comm]={'*LATT*'}>} Fatturato),Prodotto),FirstSortedValue(Sum({<Anno={$(vSelAnno)},[LIVELLO 1 - ECR]={'*FRESCO*'}, [Famiglia Az Comm]={'*LATT*'}>} Fatturato),Prodotto)&CHR(13),'-'))

Probably I make some mistakes in the logic of the expression, because it's not working, this expression: Sum({<Anno={$(vSelAnno)},[LIVELLO 1 - ECR]={'*FRESCO*'}, [Famiglia Az Comm]={'*LATT*'}>} Fatturato) shows me the total amount of the sales when showed by itself.

olivierrobin
Specialist III
Specialist III

can you do it in a load statement (that was my idea) so you have directly the best sellers

calculate the rank of each product in its category

and in your visualization, select only contributors with rank 1