Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shahid_tanmoy
Helper I
Helper I

How do I add a row in my power query editor?

Hi there, 
I have a query that is sourced from a database, I want to add a row to it that is just null or something else written in it. 

There is no way to practically do it that I can see since the table wasnt manually created by me.

Is there any syntax that can do this? 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @shahid_tanmoy ,

 

Here're two methods for your reference.

Raw data:

vstephenmsft_0-1677461358228.png

 

Method 1:

Create a new table and append. Append queries - Power Query | Microsoft Learn

vstephenmsft_1-1677461409967.png

23.png

vstephenmsft_2-1677461483848.pngvstephenmsft_3-1677461488960.png

 

Method 2:

Add a step and enter as follows. How can I manually add a row to an existing table in Power Query? ~ Hey Niels!

vstephenmsft_6-1677462127765.png

= Table.InsertRows(
    #"Changed Type",
    1,
    {[ID = "C", Age = 23, Sales = 2000]}
)

vstephenmsft_5-1677462112057.png

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

 

View solution in original post

4 REPLIES 4
mguilday
Frequent Visitor

Just adding one other method that is similar to option 2 but easier for someone like me. If you go to the "Applied Steps" section and click on the gear to the right of "Source", it will open up the source table and you can scroll down, click the plus and then type in or paste all the extra rows you want to add. It's like the "clicks" version of option 2 from Stephen's awesome post above.

@mguildayThank you so much. I'm a complete noob to Power BI but am pretty adept with Tableau. Sorting columns or rows manually in tableau is pretty easy there. Am surprised at the number of hoops i have to jump through to get similar functionality here. Anyway your post above helped me solve it. Thank you!

v-stephen-msft
Community Support
Community Support

Hi @shahid_tanmoy ,

 

Here're two methods for your reference.

Raw data:

vstephenmsft_0-1677461358228.png

 

Method 1:

Create a new table and append. Append queries - Power Query | Microsoft Learn

vstephenmsft_1-1677461409967.png

23.png

vstephenmsft_2-1677461483848.pngvstephenmsft_3-1677461488960.png

 

Method 2:

Add a step and enter as follows. How can I manually add a row to an existing table in Power Query? ~ Hey Niels!

vstephenmsft_6-1677462127765.png

= Table.InsertRows(
    #"Changed Type",
    1,
    {[ID = "C", Age = 23, Sales = 2000]}
)

vstephenmsft_5-1677462112057.png

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

 

Thanks bruh, you a G man. Been looking all over the net for that simple ass code. 
Sadly its not going to work cause randomly, I was going to use a third table with just one column as a connector for 2 other tables to filter them but there are some blank columns, however, powerbi doesnt register the blank or null as a valid slicer option in practice for that blanks in the other tables. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.