Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis: Customer with min sales

I am attempting to to display the customer with the minimum sales with set analysis and I am having trouble. So if I am using the KPI object and have 2 customers like Cust1 (sales = 80000) and Cust2 (sales = 90000) I want to have the KPI object display Cust1.

Any help would be appreciated. Thanks!

4 Replies
eduardo_sommer
Partner - Specialist
Partner - Specialist

This may help

=only({$<Sales={$(=min(Sales))}>} Customer)

considering Sales as the field with total sales of customer and Customer as the name of the Customer

If two or more customers have the same Sales as the min(Sales), the only function will return a null

Eduardo

sunny_talwar

May be this:

=FirstSortedValue(Customer, sales)

or

=FirstSortedValue(Customer, Aggr(Sum(sales), Customer))

Not applicable
Author

Definitely this is the answer , I've tried:


=FirstSortedValue(Customer, TotalSales)

Anonymous
Not applicable
Author

what about this:

=aggr(min(sum(Sales)), Customer)