Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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 so...
  • Ashish_Mathur's avatar
    5 years ago

    Hi,

    Go to Add Column > Custom Column

  • nandukrishnavs's avatar
    5 years ago

    Anonymous 

     

    Add a custom column.

    = null




    Regards,
    Nandu Krishna

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

    Proud to be a Super User!

     

     

  • AllisonKennedy's avatar
    5 years ago

    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"
  • mussaenda's avatar
    5 years ago

    Hi Anonymous,

     

    on Power Query,

    Add Custom Column,

    Change Custom name to your desired column name,

    Add in body ""

    then Ok

     

    Hope this helps.