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

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

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

For 1st

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

For 2nd

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

View solution in original post

2 Replies
tresesco
MVP
MVP

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

MK_QSL
MVP
MVP

For 1st

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

For 2nd

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