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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Centaur
Helper V
Helper V

adding Column to Source Data but doesnt show in Refresh

Hello I added a column to the source table in excel and thought that column would show after I refresh power query but I dont see it  How to show it in power query? 

 

thank you

1 ACCEPTED SOLUTION

Minor correction:

You don't need the second instance of the column names as that is only used if you want to change the column names. So this works...

 

let
  Source = Excel.CurrentWorkbook(),
  #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "tb")),
  #"Expanded Content" = Table.ExpandTableColumn(
    #"Filtered Rows",
    "Content",
    Table.ColumnNames(Table.Combine(#"Filtered Rows"[Content]))
  ),
  #"Renamed Columns" = Table.RenameColumns(#"Expanded Content", {{"Name", "Table Name"}}),
  #"Sorted Rows" = Table.Sort(#"Renamed Columns", {{"Bank Name", Order.Ascending}}),
  #"Changed Type" = Table.TransformColumnTypes(
    #"Sorted Rows",
    {
      {"Date Closed", type date},
      {"Signatories", type text},
      {"Comments", type text},
      {"Bank Relationship Manager", type text}
    }
  )
in
  #"Changed Type"
Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

5 REPLIES 5
Centaur
Helper V
Helper V

Hello, thanks for the reply.  I am a novice PQ user. 

Here is the Advanced Editor code:

I dont see that the column I added [Status] as being in the code right after Bank Name.  I am not sure if it will have to be manually added but would think that it would be added automatically. 

thank you

let
Source = Excel.CurrentWorkbook(),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "tb")),
#"Expanded Content" = Table.ExpandTableColumn(#"Filtered Rows", "Content", {"Company", "Co Code", "Bank Name", "Account Name", "Date Closed", "Bank Key (ABA) Wire", "Bank Key (ABA) ACH", "Account No", "Origin ID", "CO ID", "Description", "SWIFT # (Domestic)", "SWIFT # (Foreign)", "House Bank", "Account ID (for SAP)", "CO ID2", "Vendor Code", "Opening date", "Wire", "ACH", "Check", "Positive Pay", "Collections", "Bank Relationship Manager", "Relationship Manager#(lf)Phone #", "Relationship Manager#(lf)Email", "Relationship Manager#(lf)Address", "Signatories", "Comments"}, {"Company", "Co Code", "Bank Name", "Account Name", "Date Closed", "Bank Key (ABA) Wire", "Bank Key (ABA) ACH", "Account No", "Origin ID", "CO ID", "Description", "SWIFT # (Domestic)", "SWIFT # (Foreign)", "House Bank", "Account ID (for SAP)", "CO ID2", "Vendor Code", "Opening date", "Wire", "ACH", "Check", "Positive Pay", "Collections", "Bank Relationship Manager", "Relationship Manager#(lf)Phone #", "Relationship Manager#(lf)Email", "Relationship Manager#(lf)Address", "Signatories", "Comments"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Content",{{"Name", "Table Name"}}),
#"Sorted Rows" = Table.Sort(#"Renamed Columns",{{"Bank Name", Order.Ascending}}),
#"Changed Type" = Table.TransformColumnTypes(#"Sorted Rows",{{"Date Closed", type date}, {"Signatories", type text}, {"Comments", type text}, {"Bank Relationship Manager", type text}})
in
#"Changed Type"

 

I think I see the problem, by default, Power Query, when doing actions like expanding columns, explicitly names them. It's not ideal when things change, which is common.

Try this code, (I think I've typed this correctly but let me know)

let
  Source = Excel.CurrentWorkbook(),
  #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "tb")),
  #"Expanded Content" = Table.ExpandTableColumn(
    #"Filtered Rows",
    "Content",
    Table.ColumnNames(Table.Combine(#"Filtered Rows"[Content])),
    Table.ColumnNames(Table.Combine(#"Filtered Rows"[Content]))
  ),
  #"Renamed Columns" = Table.RenameColumns(#"Expanded Content", {{"Name", "Table Name"}}),
  #"Sorted Rows" = Table.Sort(#"Renamed Columns", {{"Bank Name", Order.Ascending}}),
  #"Changed Type" = Table.TransformColumnTypes(
    #"Sorted Rows",
    {
      {"Date Closed", type date},
      {"Signatories", type text},
      {"Comments", type text},
      {"Bank Relationship Manager", type text}
    }
  )
in
  #"Changed Type"

 

The "Table.ColumnNames(Table.Combine(#"Filtered Rows"[Content]))" part takes care of getting all column names dynamically.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Minor correction:

You don't need the second instance of the column names as that is only used if you want to change the column names. So this works...

 

let
  Source = Excel.CurrentWorkbook(),
  #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "tb")),
  #"Expanded Content" = Table.ExpandTableColumn(
    #"Filtered Rows",
    "Content",
    Table.ColumnNames(Table.Combine(#"Filtered Rows"[Content]))
  ),
  #"Renamed Columns" = Table.RenameColumns(#"Expanded Content", {{"Name", "Table Name"}}),
  #"Sorted Rows" = Table.Sort(#"Renamed Columns", {{"Bank Name", Order.Ascending}}),
  #"Changed Type" = Table.TransformColumnTypes(
    #"Sorted Rows",
    {
      {"Date Closed", type date},
      {"Signatories", type text},
      {"Comments", type text},
      {"Bank Relationship Manager", type text}
    }
  )
in
  #"Changed Type"
Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Hi, thank you very much.  It works!  I am not sure what I did to make the query exclude the column.  I am a novice user.  thanks again.  

KNP
Super User
Super User

It should show.

You've not really given enough information to get any help.

Can you share your Power Query code from the advanced editor?

Sample data if possible?

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.