How to add an empty column in Power BI

Do you know how to add or create an empty column in Power Bi? Also, do you have any ideas on how to add and display the empty column in the matrix visual in Power BI? If not, then this detailed tutorial will help you how to add empty columns in Power BI as well as how to remove empty columns in power bi.

Add an empty column in power bi

Let us see how we can add a custom empty column to the table in Power Bi.

Example:

  • For this scenario, we will use an Excel spreadsheet named Vehicle. This excel sheet has four fields: Car NamesCar ModelsPrice, and Color. Refer to the screenshot below.
add a column with the same value in Power BI
add a column with the same value in Power BI
  • Open the Power BI desktop, load the table data into the Power Bi desktop, select the Modelling tab, and click on the New Column option to create a column.
  •  Enter the below-mentioned formula into the formula box, and click on the check button.
Empty Column = ""

Where,

  1. Empty column = column name
  • In the below screenshot, the new empty column has been added to the table as below:
Add an empty column in power bi
Add an empty column in power bi

This is how to add a custom empty column to the table in Power Bi,

Power query adds multiple empty columns

Let us see how to add custom multiple empty columns to the table using the power query editor in Power bi.

  • Open the Power BI desktop, and load the table data into it, In the ribbon, under the Home option click on the Transform data option
  •  So that it will redirect to the power query editor, where we can add custom columns to the table.
  • Once it is redirected to the Power Query editor, under the Add column option, select the Custom column,  Enter the below-mentioned formula into the formula box, and click on the Ok button.
" "
  • Click on the Close and Apply option from the ribbon to reflect the changes on the Power BI desktop.
= Table.AddColumn(#"Added Custom1", "Custom.2", each "")
Power query add multiple empty columns
Power query add multiple empty columns

This is how to add multiple empty columns to the table with empty row data using the power query editor in Power bi.

See also  How to remove rows in power query editor [With various examples]

Read How to add a column with a dropdown list in Power Query

Power bi add an empty column to a matrix

Let us see how we can add an empty column to the matrix in Power BI,

  • Open the Power BI desktop, load the table data into it, select the Modelling tab, and click on the New Column option to create a column.
  •  Enter the below-mentioned formula into the formula box, and click on the check button.
Empty Column = ""

Where,

  1. Empty column = column name
  • In the below screenshot, the new empty column has been added to the table as below:
Add an empty column in power bi
Add an empty column in power bi
  • Now in the report tab, from the visualization pane, select the matrix visual, and in the fields section drag and drop the column fields as below:
  • In the below screenshot, you can see that the new empty column has been added to the matrix visual.
Power bi add an empty column to the matrix
Power bi adds an empty column to the matrix

This is how to add an empty column to the matrix visual in Power BI.

Delete Empty columns in Power Query

Let us see how we can remove or Delete the empty columns using the Power Query editor in Power Bi,

  • Open the Power BI desktop, and load the table data into it, In the ribbon, under the Home option click on the Transform data option
  •  So that it will redirect to the power query editor, where we can add custom columns to the table.
  • Once it is redirected to the Power Query editor, select the empty columns, from the ribbon expand and select the remove columns option as below:
Delete Empty columns in Power Query
Delete Empty columns in Power Query
  • In the below screenshot, you can see that the empty column has been deleted from the table, click on the close and apply option so that the changes will be reflected in the Power Bi desktop.
= Table.RemoveColumns(#"Added Custom2",{"Custom", "Custom.1", "Custom.2"})
Delete Empty columns in Power Query example
Delete Empty columns in the Power Query example

This is how to remove or delete empty columns using the Power Query editor in Power Bi.

See also  Power BI Table Conditional Formatting [With Examples]

This Power BI tutorial demonstrated how to add and delete empty columns using the Power Query editor, Also covered the below-mentioned topics:

  • Power query adds multiple empty columns
  • Power bi adds an empty column to the matrix
  • Delete Empty columns in Power Query or remove empty columns in power bi

You may like the following Power BI tutorials:

>