Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get maximum value within a group and populate for every row of a chart

This has been bugging me for a while now. In this kind of example data, I would need to get the product with the highest revenue within a group populated in a column and also the revenue of that product. What I have achieved so far is only get the values populated on the matching rows, but not on the others.

I cannot use any precalculation because, like in the example, there is an inputfield involved.

The following table shows the correct result.

GroupProductRevenueProduct with most revenue in   groupRevenue of the product with most   revenue
AA15A210
AA210A210
AA35A210
BB120B120
BB220B120
BB35B120


I only have the bolded values in my table at the moment with the following style expressions:

=Aggr(
if(rank(sum(QTY * Price), 4, 1) = 1
, Product
)
, Group, Product
)

0 Replies