cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jwi1
Post Patron
Post Patron

Add empty column to table in power query

Hi all,

I want to add an extra column to a table in power bi query. All rows must be empty, just a column with only a column name.

Most probably I have to use the 'add column' option, but I need some guidance.

Thanks upfront for you help!

John

4 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Go to Add Column > Custom Column


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

nandukrishnavs
Community Champion
Community Champion

@jwi1 

 

Add a custom column.

= null

nandukrishnavs_0-1606539159711.png




Regards,
Nandu Krishna

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍

Proud to be a Super User!

 

 

View solution in original post

AllisonKennedy
Super User
Super User

Click the 'Custom Column' from the Add column tab and in the box either type

 

null

or

""

depending on the result you want. 

 

Here is sample code for advanced editor and/or formula bar if you want: 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMkImjZViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Existing Column" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Existing Column", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Null Column", each null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Blank Column", each "")
in
    #"Added Custom1"

Please @mention me in your reply if you want a response.

Check out my Tokyo 2020 report with live stats - KUDOS much appreciated

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

mussaenda
Resident Rockstar
Resident Rockstar

Hi @jwi1,

 

on Power Query,

Add Custom Column,

Change Custom name to your desired column name,

Add in body ""

then Ok

 

Hope this helps.

View solution in original post

7 REPLIES 7
Alisont1
New Member

I'm not sure if I'm having the same problem. But all I want to do is add new columns to my power query database because we added columns to our original template. Now some excel

files that have been merged into the database aren't showing the newly added columns information. How can I add new columns without associating them with columns already on the database? I just need to add new columns so that the information from the excel files will match the headings in the database and make everything populate because right now it's not.

@Alisont1 

 

If you have added new columns to your source file in this case is a excel sheet. Though the new columns that you added are empty you have to refer while importing in power query and you should not create a new blank column. Go back to your Power Query and check the headings if the new blank column is exported hen all the problem might resolve.

 

Let me know if my understanding is correct.

 

Thanks,

Karthik

mussaenda
Resident Rockstar
Resident Rockstar

Hi @jwi1,

 

on Power Query,

Add Custom Column,

Change Custom name to your desired column name,

Add in body ""

then Ok

 

Hope this helps.

View solution in original post

AllisonKennedy
Super User
Super User

Click the 'Custom Column' from the Add column tab and in the box either type

 

null

or

""

depending on the result you want. 

 

Here is sample code for advanced editor and/or formula bar if you want: 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMkImjZViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Existing Column" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Existing Column", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Null Column", each null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Blank Column", each "")
in
    #"Added Custom1"

Please @mention me in your reply if you want a response.

Check out my Tokyo 2020 report with live stats - KUDOS much appreciated

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

nandukrishnavs
Community Champion
Community Champion

@jwi1 

 

Add a custom column.

= null

nandukrishnavs_0-1606539159711.png




Regards,
Nandu Krishna

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍

Proud to be a Super User!

 

 

View solution in original post

Thanks for the quick solution.

Ashish_Mathur
Super User
Super User

Hi,

Go to Add Column > Custom Column


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!