Do you find it frustrating when you want to change table headers in Tableau without altering the field names? If so, you're not alone. However, I stumbled upon a simple yet effective solution that has been a game changer for me and my colleague Shreya from DS 39. Let me share this trick with you!
Step-by-Step Guide:
- Set Up Your Table:
- Start by dragging some dimensions and calculated fields onto the row shelf to create a table. Note that this trick works only with dimensions and calculated fields, not measures. If needed, create a calculated version of your desired measure beforehand.
- Example Using Superstore Data:
- For demonstration purposes, let's use the "City" dimension and a calculated field that calculates the sum of sales.
- Customize Field Name:
- Suppose you want to keep the calculated field name as "Sum of Sales" for commentary purposes but change the field name to "Sales by City." Here's how to do it:
- Double-click on the "Sum of Sales" blue pill.
- Type "//Sales by City" before the part referencing the calculated field.
- Press Shift + Enter, then Enter.
- Suppose you want to keep the calculated field name as "Sum of Sales" for commentary purposes but change the field name to "Sales by City." Here's how to do it:
- Adjust Pill Type:
- After performing the above steps, the calculated field will turn into a continuous measure (a green pill). Simply right-click on it and select "Discrete" to revert it.
Visual Demonstration:
![](https://www.thedataschool.co.uk/content/images/2024/04/Header-alias.-3gif.gif)
And there you have it! You can now customize your table header names in Tableau without changing the original calculation or dimension names. Happy analyzing!