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: 
Anonymous
Not applicable

Using Rank & Advanced Aggregration in a text box

Hi

I am familiar wit the Rank function, and I am also fairly used to the advanced aggregration function.

However I am now facing issues when trying to put the rank of a selected client into a list box.

I have customers and sales. I want a textbox to return the rank of a selected customer according to a specific metric.

The two approaches are what I have attempted so far:

 

=

aggr(rank(sum({<Customer_Name=>} Sales / (Returns *.025)))

However the above is not returning the correct result.

I am passing the customer name into the set analysis because I want the rank to be evaluated for the full set of customers, not just the selected one (however I need to rank of the selected customer).

Any help most appreciated.

2 Replies
Anonymous
Not applicable
Author

Hi, not sure if you dropped a bit of the expression.

You'll need to aggregate over the Customer_Name as dimension:

aggr(rank(sum({<Customer_Name=>} Sales / (Returns *.025)), Customer_Name)

Not applicable
Author

Hi,

I hope i understand your question.

Create a Listbox with Customer_Name. On the tab formula create

rank( sum ( {1} Sales / (Return *.025))

The listbox show the customernames. The rank function use now always all data.