Power Query Create Table in Power BI + Examples

The Power Query Editor in Power BI is a strong tool for transforming data. It helps you clean and manipulate data right within Microsoft Power BI.

In this tutorial, I will explain how to create table in power query, including:

  • How to use the blank query to create a new table in power query
  • Add a column in the power query editor

Power Query Create Table

To create a table in power query, follow the steps below:

1. Open Power BI Desktop, then under the Home tab, click Transform data.

create table power query

2. In the Power Query Editor, Under the Home tab, click Enter Data.

create a table in power query

3. Then the below Create Table dialog box will appear. We use the ‘+‘ symbols to add new columns and rows.

how to create a new table in power query

4. We can add data to the table by typing it into the grid.

create new table in power query

5. Now, our table is created. Then, specify the table name under the Name field and Click Load.

how to create a table in power query

6. Now, you can see the table get created directly inside the Power query editor.

power query new table

This way, you can create a table in the Power Query editor.

How to Create New table in Power Query

Here, we will see how to use the blank query to create a new table in Microsoft Power BI.

The Blank query option in the Power Query Editor provides a blank space where you can write new queries from scratch to create a new table or perform other operations.

Syntax:

 #table(
    {
      "First Column Name",  
      "Second Column Name" 
    }, 
    {
      {
        First Row First column Value,First Row Second column Value
      },
      {
        Second Row First column Value,Second Row Second column Value
      }
    }
  )

Now follow the below steps:

1. Open Power BI Desktop, then under the Home tab, click Transform data.

power query add table

2. In Power Query Editor, click on the New source and select Blank Query.

create data table in power query

3. In the Froumal bar, put the below expression.

= #table({"Name","Department"},{{"Alex","IT"},{"John","Finance"},{"Ruby","IT"}})

Where:

  • Name = First Column Name
  • Department = Second Column Name
  • Alex, John, Ruby = First column Values
  • IT, Finance, IT = Second column Value
power query create new table

4. Then, you can see a table created in the Power query editor.

power query create table from scratch

This way, you can create a table using power query m.

Power BI how to use Power query to add a column

Let’s learn how to put in a new column from a table we already have using Power Query Editor.

I hope you created a table like a screenshot:

how to add new table in power query

Now Follow the below steps to add a column:

1. Under the Home tab, click Transform data.

powerquery create table

2. In Power Query Editor, go to Add column-> select Column From Example-> From selection from the ribbon.

power bi create table from query

3. Now rename Column 1 to the name of the column and provide a value from the selected column.

In my case, I give the name of the column “Salary” and values 20000,25000,30000. Then click on OK. Check the screenshot below.

create new table power query

4. Then, you see the salary column added in the Power Query Editor.

power query create a table

This way, you can use a Power query to add the column in Power BI.

Also, you may like:

Conclusion

In this tutorial, we explored how to create a table in Power Query editor, how to utilize blank queries to start new tables, and how to add columns within the editor.

>