Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
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?

5 Replies
sunny_talwar

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

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

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))