Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
panwipa2528
Contributor III
Contributor III

How to: Get Max Value for make invitation list

I have raw data for prepare invitation list.
For Invitation list I need to select agent name who will take care member, so I will select Agent who member have max(sum(sale)).

If you confuse about what I am talking about please see photo as attach file.

5 Replies
sunny_talwar

Try using FirstSortedValue()

Capture.PNG

panwipa2528
Contributor III
Contributor III
Author

Sale is not field in dimension how should I do?

tresesco
MVP
MVP

Then how do you get sales value?

kuba_michalik
Partner - Specialist
Partner - Specialist

Either use Aggr in formula (see example) or preaggregate data in script with group by.

FirstSortedValue requires 1:1 relationship between sorted field and sort weight field, so you can't use it directly when your sort weight is a result of aggregation.

sunny_talwar

You can just do something like this

FirstSortedValue(ShopName, -Aggr(Sum(Sales), MemberID))