Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select only Top Value for calculating the average

Hi there,

I have the following table:

DateRegionPersonProductSales
JanEuropeAdamBanana5000
JanEuropeAdamLemon1000
JanEuropeBertaApple3000
FebEuropeAdamBanana4500
FebEuropeAdamLemon595
FebEuropeBertaApple3250
FebEuropeBertaCherries500

and so on.

All these Values I display in a Table Chart, which works totally fine.

I also want a line chart when I am selecting a certain Region, e.g. Europe where only the top selling products for each Person are displayed. I am struggling with Set analysis, so I hope somebody is capable of helping me in this case.

As a dimension I used: Date, Region and Person.


Thanks a lot in advance.

Alex

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

With those dimensions, one of these expressions will work:

FirstSortedValue(Product, -Sales)

or

FirstSortedValue(Product, -Sum(Sales))


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Jonathan,

what if I want to display the top average of a product?

So, calculating the average of each product of each person and just displaying the top average in the end?

Thanks,

Alex