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

Rank?

Hi,

How to get the distinct rank?

i've used below expression as Cal. Dimession

=aggr(Rank(sum(SoldQty)),Article)

Current output is below. but i need to get each article unique rank (now it's not showing because rank 3-7 all article total are same )

please advise me, how to resolve this issue. Thanks

Rank.JPG

Looking this solution in front end.


Thanks,

Deva

4 Replies
Kushal_Chawda

try rank(Expression,0,1)

or

rank (Expression,4)

devarasu07
Master II
Master II
Author

Hi,

Thanks, Yeah it works with below expression , what is the meaning of 4 and 0,1  in that rank expression?

=aggr(Rank(sum(SoldQty),4),ArticleNo)

Thanks,

Deva

Kushal_Chawda

rank([ total ] expression [ , mode [, format ] ])

Evaluates expression, compares the result with the result of the other rows containing the current column segment

and returns the ranking of the current row within the segment. For bitmap charts, the current column

segment is defined as it appears in the chart's straight table equivalent (Actually all QlikView charts have a

straight table equivalent with the exception of the pivot table which has a more complex structure).

If the chart is one-dimensional or if the expression is preceded by the total qualifier, the current column segment

is always equal to the entire column. If the table or table equivalent has multiple vertical dimensions,

the current column segment will include only rows with the same values as the current row in all dimension

columns except for the column showing the last dimension in the inter field sort order.

The ranking is returned as a dual value, which in the case when each row has a unique ranking will be an

integer between 1 and the number of rows in the current column segment.

In the case where several rows share the same ranking, the text and number representation can be controlled

as follows:

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.

1 Lowest rank on all rows.

2 Average rank on all rows.

3 Highest rank on all rows.

4 Lowest 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).

1 Low value on all rows.

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

The order of rows for mode 4 and format 2 is determined by the sort order of the chart dimensions.

devarasu07
Master II
Master II
Author

Hi Kushal,

Please refer to the attachment.

Suggested Rank expression working with one group by dimension, if i add more than one again it goes to original state? do you have any idea? thanks

I've tried like below,

=aggr(Rank(sum(SoldQty),4),Launch_No,Original_Selling_price,ArticleNo)

Report Order Sequence:

Required: Need to show the report Order sequence will below

1) Launch_No,  (Is number (one launch can have many article with selling price)

2) Original Selling Price (high to low value)  ---> Is the Price value from dimension

3)  Sold Qty (high to low) by Article No

Thanks,

Deva