
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Top 3 products and its top 3 customers in Multi KPI
I was able to get the top 3 product names displayed in KPI, but I want to display the top 3 customers(based on the count of the purchase date) for the top 3 products.
=FirstSortedValue([products],-aggr(count(sales date),[products]), 1)
How to add a sub field that displays the top customers for those products in KPI/Multi KPI
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why don´t you try
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 1)
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 2)
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 3)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can give below a try:
=concat(
if(aggr( rank( count({<products= {"=aggr(rank(count([sales date]), 1, 1), products) <=3"} >} [sales date]), 1, 1), customers) <=3,
customers
), ', ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why don´t you try
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 1)
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 2)
=FirstSortedValue([customers],-aggr(count(sales date),[customers]), 3)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would help other people when you close the threads you open marking the correct answer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to get something like this, either in a separate KPI or single KPI
Top Product1 Top Product 2
Customer1 Customer1
Customer 2 Customer2
Customer3 Customer3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why we use -Aggr?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @akmalquamri, the negative sign is used to reverse the sorting order when using FirstSortedValue or similar functions to get the "first" value based on a specific expression.
