Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

anjali0108
Contributor II

Rank Function

Hi,

I am using rank function on one column and getting the below results:

The formula used for Rank is :

=Rank(count({$<[Common Ticket Type]={'INCIDENT'}>} TicketID),4)


But if you will see below the rank in column 1 should be '3' for value '82' in column 2 but it is coming 12.

error.PNG

Please let me know if I am doing something wrong.

Also using these ranks I am storing top 10 resolver groups in variables.

My requirement is that I want to show the top 10 resolver groups based on the calculation done in column 2 above and show it like A,B,C etc below in descending order:

Capture3.PNG

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Rank Function

Hi,

in Count You are using DISTINCT, not in Rank.

Regards,

Antonio

6 Replies
prma7799
Honored Contributor III

Re: Rank Function

In my application it is work fine.

rank.png

Try like this

=Rank(count({$<[Common Ticket Type]={'INCIDENT'}>} TicketID))


Or Please share some sample app

antoniotiman
Honored Contributor III

Re: Rank Function

Hi,

in Count You are using DISTINCT, not in Rank.

Regards,

Antonio

balar025
Contributor III

Re: Rank Function

Hi,

both the formula are different. One is distinct count and other is all count with rank.

anjali0108
Contributor II

Re: Rank Function

Hey,

Thanks dear .

anjali0108
Contributor II

Re: Rank Function

Hi Antonio,

Thanks ,That was a blunder that I did.

Also,could you please tell me if I have two same ranks like 7-8 for 2 different resolver groups,how can i take both of them as I have to show 10 top count even if two groups have same count.

Currently I am using mode 4 in rank

antoniotiman
Honored Contributor III

Re: Rank Function

Rank(.......,0,1)

Community Browser