2 Replies Latest reply on Oct 13, 2016 11:27 AM by Johan De Groot

# Row-number after double sort/rank on measure

I have a table with a dimension and two measures. The table is sorted on both measures by creating 'ranked' table calculations.

This works well - but now I want to have a rank in front of the rows. An index() doesn't work since the ranking mixes the rows - anyone any idea on how to put a 'row number' on the visualisation while the ranking/sorting is still in place?

Attached a small example of my workbook

• ###### 1. Re: Row-number after double sort/rank on measure

Johan,

You can go with

RANK_UNIQUE( (100 * SUM( [Rating] )) + SUM( Value2 ))

Depending on how big  Value2 can get  you can change the multiplier of 100  for something bigger (in case SUM(Value2) would be higher than  100*SUM(Rating).

See in the attached...

Michel

1 of 1 people found this helpful
• ###### 2. Re: Row-number after double sort/rank on measure

Thanks - that should do the trick!

With a total of value2 as the multiplier of the rating I should be safe using the formula.

Kind regards,

Johan