Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
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
), ', ')
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)
You would help other people when you close the threads you open marking the correct answer
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
Why we use -Aggr?
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.