Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
NickBentley
Contributor II
Contributor II

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
saran7de
Master
Master

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
saran7de
Master
Master

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",  
];

 

saran7de
Master
Master

commQV76.PNG

 

Top Selling Customer Name

=FirstSortedValue(Product,-[Total Sales])

Top Selling Customer Sales

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

View solution in original post

NickBentley
Contributor II
Contributor II
Author

Thanks saran7de!

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