cancel
Showing results for 
Search instead for 
Did you mean: 

Facing Duplicate issue with Rank Function

Former Member
0 Kudos

Hi All,

I am facing issue with Duplicate value with Rank function.

For e.g: I have one dim called customer group, and their Actual Values which is a measure value. I need to show Top 5 Customer Based on Actuals.

I am using Rank function(V_Rank([Actual];[Customer group];TOP)) to show top 5, but it is given 6 Customers when there are 2 Actual is Same.

See below Screenshot for Reference.

You can see in above screenshot, there are actuals is same 71.79 at 5th level, I am also using the Block level condition to show only 5 Customer (V_Rank in list (1,2,3,4,5)).But based on same Actuals it is showing me 6,

Can any one help me to show only 5 customer,

Thanks & Regards,

Akhil Muley

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

A nice workaround from Sathish, but the key is to establish, as was hinted at, if there is a secondary criteria - cricket uses run rate, football uses goal difference as examples if teams are level on points. Do you have a secondary criteria? More importantly, does the end user?

sateesh_kumar1
Active Contributor
0 Kudos

You can do little trick.

V_rank =Rank([Measure])

V_Rank of Ranks =If([V_Rank]=Previous([V_Rank])) Then [V_Rank]+1 Else [V_Rank]

create alerter V_Rank of Ranks greater than 5 ,format it to white color,no border,back ground white.

Former Member
0 Kudos

Hi Satish,

This is crosstab repor and i do have 2 more columns, i can not hide col by making background colour white. I already hv tried following solution:

V_RanK = (Actaul;Customer group)

v_Previous = Previous(V_rank)

v_Flag = If([V_Rank]=[v_Previous];0;1) and then try putting v_flag=0 on block level. But it doest work. Did not hide the column in crosstab where values are reapeating.See below screenshot.

Thanks & Regards,

Akhil Muley

sateesh_kumar1
Active Contributor
0 Kudos

You may need to adjust your formula based on dimensions used in table.

Place your ranking formula in cross tab rows and check.

Former Member
0 Kudos

Hi Satish,

I didt get you,can you pls explain in detail?

Regds,

Akhil

sateesh_kumar1
Active Contributor
0 Kudos

Hi Akhil ,

Check your rank formula is giving correct results by placing the variable in cross tab rows .If you are getting rank 5 , two times then alert will work.

Post sample data if possible

Former Member
0 Kudos

Hi Satish,

Please see below screenshot and let me know how can we hide column with Alerter?

This is crosstab report, and wanna show only Top 5 customer. You can see rank 5 is repeating, I do have 2 more column after rank column (Otehrs Total, Overall Total)

Regards,

Akhil Muley

sateesh_kumar1
Active Contributor
0 Kudos

V_Rank =Rank([Measure])

V_Rank duplicate =If([V_Rank]=Previous([V_Rank])) Then 1

add V_Rank and V_Rank Duplicate as header rows

apply alert on V_Rank Duplicate Equal to 1 , format back ground blue for header and white for rows

Any how rank will continue to the next level if it same .still if you want to format it use alerter or you show them

V_Rank of Ranks=If([V_Rank]=Previous([V_Rank])) Then [V_Rank]+1 Else [V_Rank]

sateesh_kumar1
Active Contributor
0 Kudos

Hi Akhil ,

This is by design .Do you have any condition on which value to show if ranks are same.

Former Member
0 Kudos

Hi Satish,

Any one out of that repeating 2. but most likely to first repeating one.

Regds,

Akhil Muley