Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Digvijay_Singh

Rank function in QV12, is it changed?

Hi,

I am finding Rank function behaving differently after installing QV12, I am not finding related discussion in community means I am doing something wrong or missing some basics here.

Here is sample data -

Load * inline [

Dim, Data

A, 5

B, 5

C, 5

D, 6

E, 6

F, 6

];

I want to give rank 4 to A,B,C and 1 to D, E, F. Or want to give individual ranks instead of range in any logical manner. I think it was easily done in QV11 by using 2nd parameter in Rank function, probably 4.

But QV12 shows as below - 

Capture.JPG

In fact no impact of different 2nd parameter I could observe in RANK function.

Thanks in advance!

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like this

Rank(Sum(Data), 4,1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi

Try like this

Rank(Sum(Data), 4,1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Digvijay_Singh
Author

Thanks, I should have read 'help' properly.

jagan
Luminary Alumni
Luminary Alumni

HI,

Check this from Qlikview help file

The second parameter mode specifies the number representation of the function result.

mode

   

0 (default)If all ranks within the sharing group fall on the low side of the middle value of the entire ranking, all rows get the lowest rank within the sharing group.
If all ranks within the sharing group fall on the high side of the middle value of the entire ranking, all rows get the highest rank within the sharing group.
If ranks within the sharing group span over the middle value of the entire ranking, all rows get the value corresponding to the average of the top and bottom ranking in the entire column segment.
1Lowest rank on all rows.
2Average rank on all rows.
3Highest rank on all rows.
4Lowest rank on first row, then incremented by one for each row.

The third parameter format specifies the text representation of the function result.

format

   

0 (default)Low value&' - '&high value on all rows (e.g. 3 - 4).
1Low value on all rows.
2

Low value on first row, blank on the following rows.