Top customers for a specific product

How can I get the top customer by number of orders or profit for a specific product A?

So, when I open the detail of Product A, one virtual column shows the name of the best customer for that product, and same applies to all products B, C etc

Solved Solved
0 3 457
1 ACCEPTED SOLUTION

@Jeremy_F
Something like this might help:

TOP(
  ORDERBY(
    FILTER("Customers",
		[ProductA]=[_THISROW].[ProductA]
    ),
    [Orders], TRUE
  ),
  1
)

View solution in original post

3 REPLIES 3

@Jeremy_F
Something like this might help:

TOP(
  ORDERBY(
    FILTER("Customers",
		[ProductA]=[_THISROW].[ProductA]
    ),
    [Orders], TRUE
  ),
  1
)

Or use INDEX() to get the single value instead of TOP() to get a list of one.

@Jeremy_F
As @Steve proposed, you can also use this expression as well:

INDEX(
  ORDERBY(
    FILTER("Customers",
		[ProductA]=[_THISROW].[ProductA]
    ),
    [Orders], TRUE
  ),
  1
)
Top Labels in this Space