Last Modified Date: 29 Nov 2023
Environment
- Tableau Desktop
Resolution
Depending on how the view is built, the best workaround will vary. Both solutions are demonstrated in the attached workbook.Option 1
- Drag [Sales] to Columns.
- Drag [Category] to Rows.
- Right-click [Category] in the data pane and select Duplicate.
- Drag [Category (copy)] to Color on the Marks card.
- Right-click [Category] on the Rows shelf and select Sort…
- In the Sort dialog, select the desired sort order and click OK.
- Right click the color legend and select Edit Title…
- In the Edit Legend Title dialog, delete (copy) and click OK.
Option 2 (For a stacked bar chart)
Step 1 - create the view
- Create a worksheet for the stacked bar chart and name it something like "Stacked Bar Chart - just bar chart"
- Drag [Sales] to Columns.
- Drag [Category] to Rows.
- Drag [Sub-Category] to Color on the Marks card.
- Right-click [Sub-Category] on the Marks card and select Sort…
- In the Edit Legend Title dialog, delete (copy) and click OK.
- Create a worksheet for the color legend and name it something like "Stacked Bar Chart - just color legend"
- Drag [Sub-Category] onto Color on the Marks card
- In the drop-down on the Marks card, select Polygon.
Step 2 - create a dashboard
- Create a dashboard.
- Drag "Stacked Bar Chart - just bar chart" onto the dashboard.
- Remove the color legend that is automatically added.
- Drag "Stacked Bar Chart - just color legend" to an inconspicuous place on the dashboard.
Tip: Consider making this worksheet floating. - Right-click the "Stacked Bar Chart - just color legend" worksheet on the dashboard and select Hide Title
- In the drop-down at the top of the dashboard select Entire View. This will prevent scrollbars from appearing if the worksheet is sized down very small.
- Optional: Right-click the color legend and check Highlight Selected Items.
Cause
The sort order is set for the dimension at the worksheet level, thus the dimension members will be sorted the same wherever the dimension is used in the view.Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials