2 Replies Latest reply: Jul 1, 2014 4:48 AM by Manish Kachhia

# Display the Customer Name who has paid the maximum Revenue

Hello Everyone,

I have multiple columns in table, but I have work with only 3 columns date, customer name and revenue.

For a single a Customer there can be multiple revenue.

I want to display the name of the customer who has the max value of Revenue, also the customer name who has given the maximum Revenue till now

How can that be achieved ?

For more clarity I will give an example

Customer Name     Revenue     Date

A                              100          01-01-1991

A                              200          01-01-1992

B                              300          01-01-1991

C                              250          01-01-1991

C                              400          01-01-1992

D                              500          01-01-1991

Customer who has the max value of Revenue is D i.e is 500

Customer who has given the maximum Revenue till now is C (250 + 400 = 650).

How can these values be displayed in a text box.

Thanking everyone in anticiaption

• ###### Re: Display the Customer Name who has paid the maximum Revenue

=FirstSortedValue(Customer, -Aggr(Sum(Name),Customer))

• ###### Re: Display the Customer Name who has paid the maximum Revenue

For 1st

=FirstSortedValue([Customer Name], -Aggr(SUM(Revenue),[Customer Name],Date))

For 2nd

=FirstSortedValue([Customer Name], -Aggr(SUM(Revenue),[Customer Name]))