- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Summarizecolumns with rename of column
I want to rename the column to something else with DAX below.
the cntry_code column to "Country Name".
EVALUATE SUMMARIZECOLUMNS ( OPTMZ_GRP[cntry_code], "column a", SUM ('hcec_sales'[total_sales] ) )
I've tried the addsolumns but that gave me 2 of the same columns.
EVALUATE ADDCOLUMNS( SUMMARIZECOLUMNS ( OPTMZ_GRP[cntry_code], ), "total_sales", SUM ('hcec_sales'[total_sales] ) ), "Country Name", OPTMZ_GRP_BR_CURR_AIRPT[cntry_iso_cde] )
cntry_code | total_sales | country Name
USA $150 USA
is there a way to rename the column with just one column display?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

HI @xanhdieu,
I think SELECTCOLUMNS function will suitable for your requirement, it support to extract specific columns and rename them at same time.
New Table = SELECTCOLUMNS ( SUMMARIZECOLUMNS ( OPTMZ_GRP[cntry_code], "total_sales", SUM ( 'hcec_sales'[total_sales] ) ), "Country Name", [cntry_code], "total sales", [total_sales] )
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

HI @xanhdieu,
I think SELECTCOLUMNS function will suitable for your requirement, it support to extract specific columns and rename them at same time.
New Table = SELECTCOLUMNS ( SUMMARIZECOLUMNS ( OPTMZ_GRP[cntry_code], "total_sales", SUM ( 'hcec_sales'[total_sales] ) ), "Country Name", [cntry_code], "total sales", [total_sales] )
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! This works ... though for a few minutes I thought it didn't. When I first changed a field name, it gave me an error about the field name I just changed. But that was because the old field name was in the ORDER BY clause (it was auto-generated DAX). Mentioning it so I see this when I hit this error again next year 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

If I have another table of 'old column name', 'new column name' how can I use that to rename a column?

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
11-22-2023 12:59 PM | |||
09-05-2023 04:41 AM | |||
05-08-2024 02:14 PM | |||
05-21-2024 12:51 AM | |||
12-17-2017 07:22 AM |