Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
desere_k
Partner - Contributor II
Partner - Contributor II

Worst Category in dynamic text

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

Capture.PNG

10 Replies
sundarakumar
Specialist II
Specialist II

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