Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
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
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 I have another table of 'old column name', 'new column name' how can I use that to rename a column?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
68 |
User | Count |
---|---|
120 | |
110 | |
94 | |
81 | |
77 |