Hi there,
I am trying to figure out a way to make a top 5 of each category in a visual. In the SS attached you can see that the top 5 I’ve chosen are the TOP 5 overall, regardless of categories (X axis in my case). How to make it so that for every categories I have top-5 results?
Hi Przemk00,
First create a rank function on category. For example rank = rank([sum(price) DESC], [category]), it will partition the ranks by category. Than you can create a filter on rank field and filter condition can be “less than or equal to” and min value can be “5”.
This will give you top 5 results for all category.
For example, I have implemented this for Top 2 products by price for all category
1 Like