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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
michaelsikora
Contributor III
Contributor III

Display the name of dimension, at a certain rank

Hello Qlik Users,

I am trying to create an expression that uses the rank function to return a specific dimension rather than a rank #. Is there a way to do this?


For example, when I am looking at this year as a dimension, I want to have an expression that gives me the best warehouse in terms of sales volume.


So far below is what I have.


Max(AGGR(

Rank(

Sum(NetSalesUSD))

,Whse_Name),Whse_Name)

This gives me a number, but I am looking to get the Whse_Name. Any Ideas?


Thank you in advance!


Mike

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be use FirstSortedValue() function like:

= FirstSortedValue(Whse_Name, -AGGR(Sum(NetSalesUSD),Whse_Name))

View solution in original post

1 Reply
vishsaggi
Champion III
Champion III

May be use FirstSortedValue() function like:

= FirstSortedValue(Whse_Name, -AGGR(Sum(NetSalesUSD),Whse_Name))