PATH Tips/Best Practices- How to Sort by Measure Names with Parameter Actions

Posted on Posted in dicas tableau

In this Tip you will learn how to sort by measure names with parameter actions. For this, we use the Superstore database available on Tableau.

Parameter actions are as powerful feature in Tableau. In this tip, I show you how you can update a parameter with the Measure Names field. In that past, you could never use Measure Names in a calculation, but parameters are now an exception because of parameter actions.

 

 

Step 1: In a new worksheet, drag the Sales, Profit, and Quantity measures to columns and the Sub Category dimension to rows. With Ctrl selected, drag each measure to its respective Color tag card.

 

 

Step 2: Create a parameter that change the classification of measurements, with setting below. After this show the parameter control.

 

 

Step 3: After that, create a calculated field using the following calculation:

 

 

Step 4: Right-click on the Sub Category dimension, select sort by the calculated field created in the previous step.  

 

 

Step 5: In a new worksheet, double-click the Sales, Profit, and Quantity measures. Drag the Measure Values ​​for Detail field and Measure Names for columns and label. Also create an empty field with only “” in rows, as shown below:

 

Step 6: In a new dashboard, drag previously created worksheets to the view:

 

 

Step 7: In this Dashboard, create a parameter action with the setting below:

 

 

Final: Ready! Now you  know how to sort by measure names with parameter actions.