Two solutions come to mind.
The first uses LOOKUP() table calcs for Top Reason (TR1), 2nd Top Reason (TR2), ...
IF FIRST() == 0 THEN
FIRST() is used, since we only want one value returned (not one / row in the partition). Since you can specify the sort order, LOOKUP(..., 0) returns the first row and LOOKUP(..., 1) returns the second.
Drag Customers to the Columns shelf, Reason to the Detail button, and TR1 to the Text button. Once added, you'll need to adjust compute using. Right-click TR1 > Edit Table Calculation. Compute Using Advanced. Move Customer and Reason the the Addressing side and Sort to Measure, Sum, Descending.
Click OK and then in the Table Calculation dialog box, select Restarting every: Customer.
Repeat this for TR2, but change the lookup index to 1: LOOKUP(MIN(Reason), 1).
Lastly from the menu bar, select: Analysis > Stack Marks > Off.
The problem is that these are not independent rows and you don't have row labels. Above, I "hacked" this by using a calculated field Top Reason Labels =
"Top Reason" + CHAR(10) + // CHAR(10) creates a new line
"2nd Top Reason"
Option 2: Modify the data source.
To get an individual row per Top Reason, you need to run the LOOKUP(Calculation) for each member of a dimension that includes Top Reason, 2nd Top Reason, .... I did this by adding a Top Reason column to the data source and then creating an additional set of rows for each Top Reason. For example, if you want to display the two top reasons, you'll need to double the number of rows in your data set.
You can do this with a custom SQL connection or by reshaping the data in Excel (create two new columns, then use the Tableau reshape tool). You can see what the result looks like in the embedded reshape.xlsx data source---you can see this by viewing the data source in Tableau or changing the .twbx extension to .zip and looking in the /Data directory inside the zip. I used integers for the Top Reason (1, 2) to facilitate the LOOKUP function below.
After creating the data source, you can drag Top Reason to the Rows shelf and create a new calculated field TR to find the most common reason:
IF FIRST() == 0 THEN
LOOKUP(MIN(Reason), MIN([Top Reason])-1) // Top Reason is an integer integer starting with 1
Follow the Option 1 technique for Compute Using and Sort Order. Finally, right-click the 1 in the Top Reason column > Edit Alias and change this to Top Reason, 2nd Top Reason, ...
If I've glossed over a couple of steps, just let me know where you're getting stuck. ...
Example of problem_jimw.twbx 82.9 KB