Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have attached an image with Rank function implemented for EmpID and their respective Salary.
There are 4 Employes which have the same salary and Ranked as 4-5 and 8-9.
Now if I Group the Ranks into A & B, so that I can give different Ranks (i.e. the same salary gets divided into two groups) to the same salaries of different employees.
Kindly assist me implementing the same, using Rank function (without sorting)
EmpID, Salary, Rank, Group
Annie 8500 1, A
Proj 7000 2, A
Pith 6500 3, A
Rossel 5000 4-5, A
Zen 5000 4-5, A
Richie 4500 6, A
Paul 3000 7, A
Rahim 2000 8-9, A
Reshma 2000 8-9, B
Rose 1000 10, B
Thanks in advance
Hi,
Try playing with second and third parameters of Rank() like below
Rank(Expression, 4, 0) -- Lowest rank on first row, then incremented by one for each row.
Rank(Expression, 3, 0) -- Highest rows for all matching rows
Refer Qlikview help file for more details.
Regards,
Jagan.
Hi Jagan,
Thanks for your inputs.
I tried performing but seems I'm going wrong at some point.
My current Sales and Rank expressions are as below :
Sales - sum(Sal)
Rank - rank(sum(Sal))
Can you assist me with the expression forthe same.
Thanks
Hi,
Try this
Rank - rank(sum(Sal), 4, 0)
OR
Sales - sum(Sal)
Rank - rank(sum(Sal), 3)
Regards,
Jagan.
Hi Robin123,
Please select the options as shown in below screen on Rank Expression.
Hope it will help you.
Thanks.
try,
rank(sum(Sal), 4, 0)
Hey Robin do this and put number as format as in above screen shot by wizard
=rank(aggr(sum(Salary),EmpID),4,1)
It is working well fr me.
Hi Robin,
Please find the attached QVW file.It can be implemented in pivot chart using rank function.
Hi Robin123,
Did you resolve your issue?
Hello All,
Thanks everyone for your valuable inputs. I tried out sometime back and works fine for me.
Apologies for the delay in response, due to sick leave.