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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
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!

Labels (1)
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