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
pthapa
Post Patron
Post Patron

How to remove the table name in column headers in Excel?

Hello all,
Excel sheet is connected to power bi dataset and when the table is loaded, it adds the table name on suffix and the column name. How can we not have the table name on the column headers?
In the screen shot below, the highlited portion in yellow is the table name in PBI which I don't need it. I just wat the column name.
Thanks in advance.
pthapa

pthapa_0-1717770684663.png

 

1 ACCEPTED SOLUTION

lbendlin_0-1717774311928.png

Select your semantic model and add it to a table

 

Next, create a new query "from table"

lbendlin_1-1717774712719.png

add the step into the query

 

let
    Source = Excel.CurrentWorkbook(){[Name="Table_ExternalData_1"]}[Content],
    Res = Table.TransformColumnNames(Source,each if Text.End(_,1)= "]" then let p=Text.PositionOf(_,"[") in Text.Range(_,p+1,Text.Length(_)-p-2) else _ )
in
    Res

 

Click "Close and Load".

View solution in original post

7 REPLIES 7
SusieQ
Frequent Visitor

For those wondering where to paste the code, click Advanced Editor.

pthapa
Post Patron
Post Patron

Awesome, it did work. I hope it will not break when I publised this to sharepoint folder.

Appreciate your help lbendlin.

Thank you.

pthapa

pthapa
Post Patron
Post Patron

Hello @lbendlin ,
Thanks for your quick response to this topic.
I am confused with it, where am I applying the transformation steps in Excel or in power query in power bi dataset where the data is coming from?

Thanks,

in Excel Power Query.

My power query is not coming up in Excel? It is greyed out.
I did the following steps:
File>Options>Add-ins>Manage>COM Add-ins>Go>Check Power Pivot for Excel
Still power query is not coming up?

pthapa_0-1717774176620.png

 

lbendlin_0-1717774311928.png

Select your semantic model and add it to a table

 

Next, create a new query "from table"

lbendlin_1-1717774712719.png

add the step into the query

 

let
    Source = Excel.CurrentWorkbook(){[Name="Table_ExternalData_1"]}[Content],
    Res = Table.TransformColumnNames(Source,each if Text.End(_,1)= "]" then let p=Text.PositionOf(_,"[") in Text.Range(_,p+1,Text.Length(_)-p-2) else _ )
in
    Res

 

Click "Close and Load".

lbendlin
Super User
Super User

Table.TransformColumnNames(Source,each if Text.End(_,1)= "]" then let p=Text.PositionOf(_,"[") in Text.Range(_,p+1,Text.Length(_)-p-2) else _ )

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!

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 Kudoed Authors