Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple average expression

Dear all,

I need an expression that returns the following ranking :

I have successfully calculated the following simple average:

Avg( {$<Category={1}>} Amount )

and I have another dimension "Country" in a Multi box and whenever I make a choise, the above average is obviously calculated for the selected country.

What I need is an expression that calculates the max average from every country for this category=1, despite the country changes in the multibox. In other words, i want to return a static number that is the value of the max average for the country that ranks first of all averages. Can anyone help me on this please ??

Thank you!

TH

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Max({<Country = >}TOTAL Aggr(Avg({<Category = {1}, Country = >}Amount),Country))

View solution in original post

4 Replies
MK_QSL
MVP
MVP

=Aggr(Rank(Avg({<Category={1}, Country= >}Amount)),Country)

Not applicable
Author

Mr Manish I need the value of the maximum average that ranks first of all countries for this category=1,  not the rank of the selected country as you had correctly answered me on another post @Simple Rank expression.

Thank you very much for your valuable time

MK_QSL
MVP
MVP

Max({<Country = >}TOTAL Aggr(Avg({<Category = {1}, Country = >}Amount),Country))

Not applicable
Author

That was exaclty I needed. Thank you again.

Your sincerely,

TH