1 of 1 people found this helpful
Some tricks that make this work...
Edit the SORT parameter. You can see that the display value is different from the actual parameter value. The user selects what he wants from the display value, and the internal value of the parameter is the corresponding "asc" or "desc" in the parameter.
I made a RANK calc that inserts the SORT parameter value to decide whether to sort the sheet ascending or descending.
I put that on the sheet and made the calc DISCRETE. This makes it a blue pill and you can move it to the front of the ROWS list, which makes it the primary sorting pill.
One last thing I did not do, but you can. Right click on the calc on ROWS and uncheck "Show Header". Your user doesn't need to see that on the sheet. It's still in the front of the ROWS list and behaves accordingly, but it doesn't display.
You could actually expand on this to select which column to sort on. Another parameter can let the user select Profits or Sales or Cost, and I could plug the appropriate SUM(whatever) into a conditional calc.