Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Valued Contributor III

Re: Rank repeating

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

6 Replies
MVP
MVP

Re: Rank repeating

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

Re: Rank repeating

I am using just one dimension Market.

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

MVP
MVP

Re: Rank repeating

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
Valued Contributor III

Re: Rank repeating

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

Not applicable

Re: Rank repeating

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

Re: Rank repeating

Krishnamoorthy:

Thanks for your response and sample.

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