Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
My data looks like the following table:
Date | Country | Product | Number of Contacts |
15-Oct | India | A | 12 |
14-Oct | India | A | 14 |
13-Oct | India | A | 12 |
15-Oct | India | B | 16 |
14-Oct | India | B | 23 |
2-Oct | India | C | 7 |
3-Oct | India | C | 34 |
2-Oct | China | D | 1 |
3-Oct | China | D | 39 |
15-Oct | China | A | 23 |
14-Oct | China | A | 17 |
15-Oct | China | E | 9 |
We need to provide a pivot table like the following:
Country | Product receiving maximum contacts |
India | C |
China | A, D |
Hope the question is clear.
Thanks in advance.
May be try this in a straight table:
Dimension: Country
Expression: Concat(Aggr(FirstSortedValue(Product, -Aggr(Sum([Number of Contacts]), Products, Country)), Product))
Expression: =Concat(DISTINCT If(Aggr(Sum([Number of Contacts]), Country, Product) = Aggr(Max(TOTAL <Country> Aggr(Sum([Number of Contacts]), Country, Product)), Country, Product), Product), ', ')