I have my sample data which is this:
What I want to get is the most sold product for each week.
What I did on Qlik was to add week, category and this formula -> 'max(aggr(sum(num_orders), week, category))'
To get the most sold product, but the category dimension makes all the categories appear.
What should I do to filter it and make it so only the most sold category appears, like this:
Try this:
Dimension:
=week
Expression:
Max Orders =aggr(max(num_orders),week)
Max Category =FirstSortedValue(DISTINCT aggr( category, week, category) , -aggr(Sum(num_orders), week, category) )
Luiz, did Victor's post help you get things working as you wanted? If so, do not forget to return back to use the Accept as Solution button on his post to give him credit and let others know things worked for you. If you are still trying to get things working, please leave us an update as to where you are with things.
Regards,
Brett