Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi can someone please assist me.
I'm trying to find the worst selling category using the Rank function in a text object.
I have already done the best selling category using the following :
='The best selling category is: ' & chr(13) & chr(13) & FirstSortedValue(Category,-aggr(sum(Sales),Category))
The following are the categories ordered according to their sales totals
The explanation is we are trying to sort the category in ascending order with the below expression
(aggr(Category,Category),'|',+aggr(sum(Sales),Category))
pipe is the seperator used, so we are using an index to find the first part which is the first part of ascending
(concat(aggr(Category,Category),'|',+aggr(sum(Sales),Category)),'|')-1
But pls use the First sorted value solution provided by tresesco, bec this might consume more ram than first sorted value.
-Sundar