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

put into a text object the best customer

Hi all,

I post here my model:

I wish to extract the CustomerCode corresponding to max(sum({$<Type={'P'}>} [Sales Amount]) )

Can anyone help me?

Thanks a lot!

1 Solution

Accepted Solutions
Not applicable
Author

Hi Roberta,

Here you are:

=aggr(if(max(total aggr(sum({$<Type={'P'}>} [Sales Amount]),Customer))=sum({$<Type={'P'}>} [Sales Amount]),Customer),Customer)

Regards

Karol



View solution in original post

2 Replies
Not applicable
Author

Hi Roberta,

Here you are:

=aggr(if(max(total aggr(sum({$<Type={'P'}>} [Sales Amount]),Customer))=sum({$<Type={'P'}>} [Sales Amount]),Customer),Customer)

Regards

Karol



Not applicable
Author

Thanks Karol!

It works well!

Roberta