Not sure but find my approach as reference below and stored in attached workbook version 10.5 located in the original thread.
1. Define Parameter P1. Select Measure
2. Define M1. Measure: if [P1. Select Measure]='Profit' then [Profit]
elseif [P1. Select Measure]='Quantity' then [Quantity]
elseif [P1. Select Measure]='Sales' then [Sales]
3. Define M2. Rank Unique: RANK_UNIQUE(sum([M1. Measure]))
4. Drag M2. Rank Unique on the rows shelf, set to Discrete, and move between Category & Segment
5. Edit table calculation M2. Rank Unique
Hope it helps,
My solution is:
1. Create a parameter "Sort by" having Sales. Profit and Quantity as String values.
2. Create a calculated field by "Sort by" calculated field as :
IF [Sort By] = "Sales" THEN [Sales]
3.Pull the fields as in the attached screenshot.
Do not forget to change the Sort By calculated field to Discrete.
4. Once you have the view, open Edit table calculation for the Sort by calculated field. Select Pane(down) and in Specific Dimensions, select Category and Sub Category.
Untick Show header to hide the Rank.
5. Show parameter control.
Hope this helps.