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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show Largest and Average amounts same table

I have a requirement where i have below details:

CompanyPersonAmount
ABCA100
ABCB200
ABCB300
XYZC300
XYZC100
XYZD500

I have to show the data in below format in straight table:

CompanyPersonLargest AmountAverage Amount
ABCB300200
XYZD500300

Basically i have to show the largest amount per company and the corresponding name of the person.

Average amount is just the average of all amounts per company.

I'm using this expression for calculating Largest amount:

MAX(AGGR([Amount]), Company, Person)

And this expression for Average amount:

AVG(AGGR([Amount]), Company, Person)

So, i'm getting the correct amounts but i'm not getting the corresponding Person Name, its coming as some random Person Name.

Can anyone help please?

0 Replies