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 Names, Car Models, Price, and Color. Refer to the screenshot below.
- 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,
- Empty column = column name
- In the below screenshot, the new empty column has been added to the table as below:
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 "")
This is how to add multiple empty columns to the table with empty row data using the power query editor in Power bi.
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,
- Empty column = column name
- In the below screenshot, the new empty column has been added to the table as below:
- 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.
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:
- 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"})
This is how to remove or delete empty columns using the Power Query editor in Power Bi.
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:
- Power Query Add Column If Statement
- Power BI DAX Filter If [With Real Examples]
- Power BI Dax Filter [With 15+ Examples]
- How to add column with a fixed value in Power BI
- How to add column from another table in Power BI
- Power Query Add Column
- How to Filter Power BI Dax Based On Condition
- How to Append Columns in Power Query
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com