Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Calculating MAX over a dimension of a straight table for every row

I would like to calculate the maximum value of a group of rows in a straight table and use it for every particular row to calculate ratios.

As an example please see table below. The last column should display the maximum value for each country, i.e. 35 for the first three rows, 57 for the next three etc.

I tried

=Aggr(Max(Aggr(Sum(Units), Country, Product)), Country),

but unfortunately as it shows in the picture this only gives values for the lines with ‘Apple’ and NULL for the others L

table2.jpg

1 Solution

Accepted Solutions
Highlighted
Employee
Employee

Try the total syntax

Max( total <Country> Aggr( Sum(Units), Country,Product)  )

This will add up the units for each combination of country and product, and then take the max value for each country and display it

View solution in original post

3 Replies
Highlighted
Employee
Employee

Try the total syntax

Max( total <Country> Aggr( Sum(Units), Country,Product)  )

This will add up the units for each combination of country and product, and then take the max value for each country and display it

View solution in original post

Highlighted
MVP
MVP

max(TOTAL <Country> aggr(sum(Units),Country,Product))

Highlighted
Not applicable

Thank you very much, that works!