Display the Top by Field Dynamically.
Create the visualization based on the calculated sorting and show the Top N field parameter?
1. Drag sales into Columns.
2. Drag region into rows.
3. Drag Customer Name into Rows and Right click on the that Customer Name and select Sort option in that select sort by Descending order and select by formula as sales and aggregation as SUM . Then click on apply then click on OK.
4. Crete a calculated sorting on the Region wise Customer Name. Write the Calculation as INDEX(), Then Drag that calculation into Innermost dimension and Right click on that field and select Add Table calculation, in that select advanced options, as shown below.
5. Create a parameter on Top N, give the fields as shown below.
7. Drag region into Color self at marks card.
8. Now the visualization looks like below.