I've created the attached workbook using the superstore data as I don't have access to your example.
I first created the parameter and then created the field called 'Dimension swap' so that the header was correct.
Next I created the filter option based on the rank - this field is called filter.
Please see the attached and see if it works for you.
Top N dynamic.twbx 7.4 MB