This post is a continuation of my previous article on renaming dataset columns in Apache Superset. In the previous post, we changed the column name from: product_name → Product Name at the dataset level. That means every chart using this dataset will display the column as Product Name.
However, sometimes you may want different charts to display different names for the same column.
For example:
· One chart may display Revenue
· Another chart may display Total Sales Amount
· Another chart may display Sales Revenue
In such cases, changing the label globally at the dataset level may not be suitable. This is where chart-level column customization becomes very useful.
Why Customize Column Names at Chart Level?
Chart-level customization helps when:
· Different dashboards target different audiences
· Business teams use different terminology
· You want shorter names in one visualization
· You want more descriptive names in another chart
· You do not want to affect other existing charts
The important thing to understand is, Chart-level customization only affects the current chart. Other charts using the same dataset remain unchanged.
Steps to Customize Column Names at Chart Level
Step 1: Open the Dataset
Click on the product_details dataset. This takes you to the chart configuration page.
Step 2: Observe the Available Columns
On the left navigation panel, you can see all the dataset columns.
Notice that the dataset already contains the column label Product Name, which we changed in the previous post.
Step 3: Add Columns to the Chart
Drag and drop the following columns into the Dimensions section:
· product_id
· Product Name
Step 4: Create the Chart
Click on the Create Chart button.
The table visualization is rendered with columns:
· product_id
· Product Name
At this point, the chart is still using the original display label for product_id.
Chart is rendered like below.
Step 5: Customize the Column Name
To change product_id to a more readable name, click on the product_id field inside the Dimensions section.
Open the Custom SQL tab
Click on the Pencil icon against product_id.
Update the display name
For example:
product_id → Product Id
Save the changes.
Click on Update Chart button, now the chart displays:
· Product Id
· Product Name
instead of the original technical column names.
Using chart-level labels provides several advantages:
· More flexibility in dashboard design
· Better readability for end users
· Ability to reuse the same dataset differently across charts
· No impact on other visualizations
· Easier business terminology alignment
Dataset-level naming is useful for standardizing column names across the platform. Chart-level customization is useful when individual visualizations need their own terminology or presentation style.
Using both approaches together helps create cleaner, more business-friendly dashboards in Superset.
That’s it, you're good to go.
Previous Next Home







No comments:
Post a Comment