Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Folks,
I have some dummy data, and I'd like to show the name of the salesperson with the least amount of sales by sum.
Data:
Load * Inline
[
SalesPerson, SaleId, Amount
Ricky, 1, 256
Ricky, 2, 765
Ronnie, 3, 23
Ronnie, 4, 67
Ronnie, 5, 865
Bobby, 6, 123
Mike, 7, 879
Mike, 8, 123
Johnnie, 9, 256
Johnnie, 10, 256
]
;
Exit Script
;
I'm expecting something like the following:
At first, I thought I could use FirstSortedValue, but I can't seem to be able to figure it out.
Any help is greatly appreciated.
Hi, In the unlikely event that multiple sales persons have the same minimum amount, this will display them as well.
=Concat(Aggr(If(Rank(-Sum(Amount))=1, SalesPerson), SalesPerson),', ')
@JustinDallas FirstSortedValue will be the right choice here
=FirstSortedValue(distinct SalesPerson, aggr(sum(Amount),SalesPerson))