Skip to main content

Posts

Showing posts with the label #tab;eausortby

Sort By Dimension in Tableau

Sort By Dimension in Tableau The below steps are based on Sample - Superstore data.  Step 1: Create a parameter Right-click in the Data pane and select Create Parameter.  In the Create Parameter dialog, do the following, then click OK:  Name: Sort By  Data Type: String Allowable Values: List For Value, enter the following list: Category, Sub-Category, Product Name and Region.   Right-click the Sort By parameter and select Show Parameter Control.  Step 2: Create a calculated field  Select Analysis > Create Calculated Field. Name the field Sort by Dimension, enter the following formula, then click OK: CASE [Sort By] WHEN 'Category' THEN [Category] WHEN 'Sub-Category' THEN [Sub-Category] WHEN 'Product Name' THEN [Product Name] WHEN 'Region' THEN [Region] END Step 3: Build your view  Drag Product Name, Sub-Category, Category, and Region to Rows.  Drag Sales to Columns.  Drag Sort by Dimension t...