Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am trying to use the 'MAX' function in a chart to to get the highest sum of units sold over 4 week period by customer.
Customer C has the highest combined total over the 4 weeks with 28 units sold.
What is the best expression to use to get '28' in my chart?
Thanks in advance 🙂
| Customer | Week | Units_Sold |
| Customer A | 1 | 3 |
| Customer A | 2 | 6 |
| Customer A | 3 | 5 |
| Customer A | 4 | 4 |
| Customer B | 1 | 2 |
| Customer B | 2 | 6 |
| Customer B | 3 | 8 |
| Customer B | 4 | 9 |
| Customer C | 1 | 4 |
| Customer C | 2 | 8 |
| Customer C | 3 | 7 |
| Customer C | 4 | 9 |
| Customer D | 1 | 4 |
| Customer D | 2 | 3 |
| Customer D | 3 | 5 |
| Customer D | 4 | 6 |
| Customer E | 1 | 2 |
| Customer E | 2 | 4 |
| Customer E | 3 | 5 |
| Customer E | 4 | 6 |
Try this
=If(Aggr(Sum(Units_Sold), Customer) = Max(Total Aggr(Sum(Units_Sold), Customer)), Sum(Units_Sold))