Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
KJM
Contributor III
Contributor III

Rank a filtered selection within its group

Hi there,

I have an App within Qliksense Saas which has access to the Sales by [Retailer Name] which represents individual stores.  Each store is a member of a particular Format (e.g. Large Rural, Small Urban etc.).

I can create a table to show the Sum(Sales) by [Retailer Name] and add a column to rank those Sales numbers with Rank(Sum(Sales).  Obviously, when I filter by Format then the rank changes for that particular Format.

What I would like to do is have a KPI visualisation called Rank Within Format so that if a particular [Retailer Name] is filtered, then it shows the number reflecting that Store's rank within its own Format.

Is there an expression within the KPI that can achieve this?  All of our efforts so far returns a 1 for every store or a hyphen.

Thanks!

Labels (6)
1 Reply
anat
Master
Master

=aggr(rank(sum({<[Retailer Name]>}Sales)),[Retailer Name])