Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank repeating

Friends:

i want to calculate revenue for 2 years , difference and then rank them.

My straight table looks like below. My current Rank expression is rank(Sum([% growth]),0,1)

 

Market    Revnue 2008          Revenue 2010       % growth          Rank

A            3800                       4369                    569                      1

B            77                           151                     74                         1

C            58                            99                      41                         1                   

D            35                            74                      38                         1                   

E            59                             79                    20                           1

F             28                             44                    16                           1  

G            0                                0                       0                           1  

Not sure why i am not getting the correct rank. I tried different options of Rank as given in QV help but getting the same results.

Please help.

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

The expression Rank([% growth]) seems to give rank correctly. (See the attached application)

View solution in original post

6 Replies
swuehl
MVP
MVP

I assume you are using more than 1 dimension in your table, right? Rank will be calculated in the context of your column segment.

Try using only 1 dimension or try using a TOTAL qualifier with your rank(TOTAL sum([% growth]),0,1)

Not applicable
Author

I am using just one dimension Market.

I did try your expression but rank is still repeating the same value.

swuehl
MVP
MVP

Is [% growth] a field or an expression label? If it's a expression label, you shouldn't use an aggregation function around. Try then without the sum or repeat the expression you are using in the referenced expression.

If this is still of no help, could you maybe upload a small sample application that demonstrate your issue?

nagaiank
Specialist III
Specialist III

The expression Rank([% growth]) seems to give rank correctly. (See the attached application)

Not applicable
Author

Swuehl:

Thanks for your response.

[% growth] is a label.

It worked without using Sum and also works if i repeat the expression which i am using in the referenced expression.

Not applicable
Author

Krishnamoorthy:

Thanks for your response and sample.

It worked without using Sum, the way you have used in your example.