Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show rank of defined value, in text object

Hi everyone,

I would like to display the rank of a company according to sum(Amounts) within a text object. Does anyone know what the expression within the text object would look like?

I thought it might be something like:

=Rank({<[Company]={'ABC'}>}Sum(Amounts))

But that returned an error. Help please!

1 Solution

Accepted Solutions
sunny_talwar

Hey Manish,

I think he want the Rank to change on other selection, except the Supplier. So I think that the formula that would work for him would be:

=Max({<Company ={'ABC'}>}Aggr(Rank(TOTAL SUM({<Company =>}Amounts),4),Company)) (without the 1)

Best,

S

View solution in original post

19 Replies
jyothish8807
Master II
Master II

Hi Andrew,

Try something like this:

Rank(Aggr(Sum(Amount),Company))

When you select any company it will display the rank.

Regards

KC

Best Regards,
KC
Not applicable
Author

Jyothish,

Thank you for your response. However, I am trying to display the rank of one particular company at all times, that would update based on other selections. I.e., rank of company A.

jyothish8807
Master II
Master II

Hi,

Try this:

=Rank(sum({<[Company]={'ABC'}>}Amounts))

Regards

KC

Best Regards,
KC
sunny_talwar

This is a kind of work around, but it seems to work. Hopefully you will find this useful.

Try this:

=Concat({State2}Aggr(Rank(Sum({<Company= >}Amount)), Company), '|')

Where State2 would be your name for the alternate state you need in your application. and you will need to lock down the selection of your Company in the alternate state's list box.

Hope this helps

Best,

S

Not applicable
Author

The problem with this method is that it always returns '1' for Company A, regardless of selection

Not applicable
Author

Is there no easier way to do this in a text object than use alternate states? I basically want to instruct it,

"Show Value for 'Company A' in Aggr(Rank(Sum(Amounts)))"

sunny_talwar

I am sure there must be an easier way to do it, but unfortunately I am not aware of it. I guess somebody else may chip in and give you a better answer. Sorry for not being very helpful.

Best,

S

Not applicable
Author

Thank you sunindia, your answer was helpful - I think it will work, but I will try to find a solution that does not involve alternate states first.

sunny_talwar

Sure thing Andrew.

Hope you succeed in your quest.

Best,

S