Add the Loc filter to context by right clicking and choosing "Add to Context". This makes sure that filter is applied first, which helps when you want to do Top N filtering.
Then add Time as a filter and go to the Top tab in the filter. Select the By Field radio button, then Top in the first drop down. In the second drop down, select your parameter created for the "N" Parameter. Next drop down select Time and finally, select Count. It should read:
By field: Top "N" Parameter by City Count.
Example using Superstore below...
If you are also prompting on Top/Bottom you would build a second sheet that was identical, except you would use Bottom in the first drop down shown in the above screenshot instead of Top. Then drop both sheets on your dashboard in a container and use the hide/show technique to show the right sheet based on top/bottom selection.
You create a calculated field for "Top/Bottom" and set it to [Parameters].[Top/Bottom Parameter Name]. Then drag that field into the filter on your Top sheet and select the "Top" value. Drag that field onto the filter of your Bottom sheet and select the "Bottom" value. As long as you have not fixed the height or width on either sheet, they will shrink to invisible when the opposite parameter value is selected. Both sheets must be in the same container for this to work. Typically I will use a vertical container and drop the sheets into that container on the dashboard but you can use horizontal if that is easier. You must also hide the Title on both sheets or they will not hide properly. You can create a third sheet and drop your parameter on it to create the title if needed. See attached example.
top_bottom_n_show.twbx 400.5 KB