Welcome to the community.
This is little bit tricky and please spend some time to digest (It' not easy)
In this case, the %age calc is horizontal and sort is vertical.
So Tableau need each layer of calculated field (+ alpha).
And it's quite difficult to handle 2nd dat asource field from primary, so I put primary data source's "Pais" as sort key.
From here, very complicated, then follow the picture step by step very carefully.
_Data_Rank_SM_10.4.twbx 634.5 KB
Thanks @Shinichiro Murakami, it was REALLY usefull.
It took some time to me understand, but it solve my problem, I was changing the entire data set to fit in a situation where I could sort the data. This solution saved my time.