Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ranking issue in text box

Hi All,

I have a question regarding ranking in text box.  I want to display the rank of a client based on sales once the client is selected.

e.g. Client X is selected and he is ranked 4th in his group.

The issue I am having is that when I the client is selected the ranking automatically goes to 1.  I would like it to provide the ranking against the group it is in.

so if it was 4th before selecting, it remains 4th after selecting.  Anyone any ideas on the syntax?

I was using variations of :

aggr(rank(TOTAL(sum(SALES))), Client)

but I had no luck.  Any help appreciated.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Its working for me. Take a look at the attached application:

Used the following expression now: =If(GetSelectedCount(Client) = 1, Concat(Aggr(Rank(Sum({<Client = >} Sales)), Client), ','), 'Select a Single Client')

HTH

Best,

Sunny

View solution in original post

8 Replies
sunny_talwar

Try this:

=Concat(Aggr(Rank(Sum({<Client = >} Sales)), Client), ',')

Not applicable
Author

Thanks but that didn't help.  I don't want a list of all the ranks as there are over a 1000.  What I want is the clients ranking to remain relative to the group even though only 1 client is selected.

sunny_talwar

When you select one particular client, it would just show you that particular client only.

sunny_talwar

What do you want to see when no client is selected?

Not applicable
Author

Hi -  would have a conditional show that the rank only appears when 1 is selected.  your calculation still does not give me the correct answer

sunny_talwar

Its working for me. Take a look at the attached application:

Used the following expression now: =If(GetSelectedCount(Client) = 1, Concat(Aggr(Rank(Sum({<Client = >} Sales)), Client), ','), 'Select a Single Client')

HTH

Best,

Sunny

ramoncova06
Partner - Specialist III
Partner - Specialist III

ignore the client selection in your set analysis

aggr(rank(TOTAL(sum({<Client=>}SALES))), Client)


Not applicable
Author

Hi - yes, My expression was much more complex than that and it was an issue with some set analysis I was using, but your example works.  thanks