Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
MatheusMS
Contributor
Contributor

filter only the maximum value per seller

Hi, everyone! I'm new to Qlik, I'm trying to filter only the max value (Column Value) per Seller. I have a table like this:

Seller Reseller Value
Guy 1 AAA U$ 100.00
Guy 1 BBB U$ 90.00
Guy 2 AAA U$ 80.00
Guy 2 CCC U$ 70.00
Guy 3 BBB U$ 60.00

Total:  U$ 400.00

And I want an output like that:

Seller Reseller Value
Guy 1 AAA U$ 100.00
Guy 2 AAA U$ 80.00
Guy 3 BBB U$ 60.00

Total: U$ 240.00

I've trying to use the rank() function to filter everything based on the rank number 1, but I was not able to click and filter all my KPI's based on the result of this function in the table. Anybody have some idea how to solve this?

 

 

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Hi, Like this in the load script

Data:
LOAD Seller,
Reseller,
Value

FROM MainTable;

Inner Join
LOAD Seller,
Max(Value) as Value
Resident Data
Group by Seller;

or this at the front end

Dimensions: Seller and Reseller

Measure: Sum(Aggr(If(Value = Max(TOTAL <Seller> Value),Sum(Value)), Seller, Value))

View solution in original post

1 Reply
BrunPierre
Partner - Master
Partner - Master

Hi, Like this in the load script

Data:
LOAD Seller,
Reseller,
Value

FROM MainTable;

Inner Join
LOAD Seller,
Max(Value) as Value
Resident Data
Group by Seller;

or this at the front end

Dimensions: Seller and Reseller

Measure: Sum(Aggr(If(Value = Max(TOTAL <Seller> Value),Sum(Value)), Seller, Value))