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

Rankdemo

Dear All,

I am trying rank function in Qlik sense for below mentioned table

ProductData:

Load * inline [

Customer|Product|UnitSales|UnitPrice

Astrida|AA|4|16

Astrida|AA|10|15

Astrida|BB|9|9

Betacab|BB|5|10

Betacab|CC|2|20

Betacab|DD|0|25

Canutility|AA|8|15

Canutility|CC|0|19

] (delimiter is '|');

In result it is sorting internally within the customer column and not overall.

Find below the snap shot of result.

Request you to please help...

1 Reply
felipedl
Partner - Specialist III
Partner - Specialist III

The Rank function depends on the dimension your sorting it into.

As an example, with your data and getting some Rank functions, I get the below image where:

Red table: Sorted by Customer

Orange table: Sorted by product

So it gives different results based on which dimension is being sorted first.

Sample.png