I have this requirement of calculating a custom rank. I need to calculate Annualized % Return for all the 6 companies. I get rank from their return %. Let's consider this as input data. Now I need to calculate Custom Ranking where if another company's return is within a percentage point of Company A, I need to assign all these companies same rank (as shown in the chart below). I have 6 companies which is going to be fixed.
So, in a nutshell my requirement is to find which companies are within a percentage point return of company A. Then convert their rank to a string and concatenate their rank; keep the rest of the ranks the same and assign it to a new variable.
Attached Image is for illustration only.