Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
philthegaps
Helper I
Helper I

Power BI desktop renaming table or column in DAX: where is the code ?

Hi all

I always wondered where I can find the code related to the renaming of a table or column in DAX, in Power BI Desktop. No code is created in Power Query, and I cannot see any code in DAX. So how can we have the original name if nothing is traced ?

 

Other topic: when I use Tabular Editor V2, I can change the names of the table/column inside the Tool (via the contextual menu), and save : the PowerBI desktop shows the changes and the names are changed accordingly.

But as soon as I refresh the PowerBI desktop a rollback is done and all my changes disappear.

If you have some clue, don't hesitate
Regards

4 REPLIES 4
Anonymous
Not applicable

Hi @philthegaps ,
You can try looking in the Advanced Editor in the Power Query Editor to find steps on renaming.

vyifanwmsft_0-1708396668764.png

vyifanwmsft_1-1708396847276.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Ada

Thank you for your answer.

 

A I said, the renaming has been made on the DAX. Here after, column "b" has been renamed in "cc" tablze "Sheet1" has been rennamed in "Sheet2"  but you can see that there is no "Table.RenameColumns" instructions in PowerQuery.

 

Here is the code:

let
    Source = Excel.Workbook(File.Contents("Book1.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"a", Int64.Type}, {"b", Int64.Type}})
in
    #"Changed Type"

 

Book1 pbix.png

 

Best regards

Daniel29195
Super User
Super User

@philthegaps 

 

i understand that you want the tracing of renaming columns  ?  like what was the name of the column before you change it ? it that correct ? 

 

if the changes are made in power bi, then you should have in power query the rename column steps . 

 

Hi Daniel

As I said, I can see nothing in Power Query.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors