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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

Retrive field value with aggr

Hi All,

i want to retrieve best Sales-Rep of the month into a text object,

i calculated value with:

aggr(sum(amount),Rep_Name) )

but i neet the name....

any ideas?

Labels (1)
5 Replies
sunny_talwar
MVP
MVP

Try this:

=FirstSortedValue(Rep_Name, -Aggr(Sum(Amount), Rep_Name))

ilanbaruch
Specialist
Specialist
Author

thank you!

I'll try my luck with another one:)

if I want to retrieve the best rep from specific dimension(department)?


sunny_talwar
MVP
MVP

Use the same expression in a straight table with department as your dimension.

ilanbaruch
Specialist
Specialist
Author

is it possible in a text object?

sunny_talwar
MVP
MVP

You can use Concat function may be:

=Concat(Aggr(FirstSortedValue(Rep_Name, -Aggr(Sum(Amount), Rep_Name)), Department), ', ')

or

=Concat(Aggr(FirstSortedValue(Rep_Name, -Aggr(Sum(Amount), Rep_Name)), Department), Chr(10))