Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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 |
Top Selling Customer Name
=FirstSortedValue(Product,-[Total Sales])
Top Selling Customer Sales
=FirstSortedValue([Total Sales],-[Total Sales])
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",
];
Top Selling Customer Name
=FirstSortedValue(Product,-[Total Sales])
Top Selling Customer Sales
=FirstSortedValue([Total Sales],-[Total Sales])
Thanks saran7de!
I managed to use the FirstSortedValue expression and it worked a treat, thanks once again!