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

Results for top selling customer only

Hi All,

I am after some advice on how to show the name and sales for the top selling customer only in a straight table.

As shown in the example below, I am trying to find the correct expression to be applied.

Thanks in advance!

ProductTotal Sales Top Selling Customer NameTop Selling Customer Sales
A$7,140,094  
B$534,855  
C$3,830,149  
D$2,178,790  
E$427,070  
F$1,431,438  
G$369,771  
H$411,258  
$274,445  
J$112,001  
K$72,054  

 

 

1 Solution

Accepted Solutions
Saravanan_Desingh

commQV76.PNG

 

Top Selling Customer Name

=FirstSortedValue(Product,-[Total Sales])

Top Selling Customer Sales

=FirstSortedValue([Total Sales],-[Total Sales])

View solution in original post

3 Replies
Saravanan_Desingh

Something like this?

tab1:
LOAD * INLINE [
    Product, Total Sales , Top Selling Customer Name, Top Selling Customer Sales
    A, "$7,140,094",  ,  
    B, "$534,855",  ,  
    C, "$3,830,149",  ,  
    D, "$2,178,790",  ,  
    E, "$427,070",  ,  
    F, "$1,431,438",  ,  
    G, "$369,771",  ,  
    H, "$411,258",  ,  
    I , "$274,445",  ,  
    J, "$112,001",  ,  
    K, "$72,054",  
];

 

Saravanan_Desingh

commQV76.PNG

 

Top Selling Customer Name

=FirstSortedValue(Product,-[Total Sales])

Top Selling Customer Sales

=FirstSortedValue([Total Sales],-[Total Sales])

NickBentley
Contributor III
Contributor III
Author

Thanks saran7de!

I managed to use the FirstSortedValue expression and it worked a treat, thanks once again!