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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vitexo87
Post Prodigy
Post Prodigy

Adding a row in the table after it has been loaded?

I need to add a line in my table however'm not finding a way to do this after the load it has been made

9 REPLIES 9
raywilson426
New Member

Adding to the old post!

 

#"Insert Row" = Table.InsertRows(#"Prior Label/Step" = {[column1 = "dataA", column2 = "dataB", column3 = "dataC"]})

https://msdn.microsoft.com/en-us/query-bi/m/table-insertrows

 

-Ray

@raywilson426  Check your syntax, that does not work.

Anonymous
Not applicable

Here is the correct Syntax

 

 #"Insert Row" = Table.InsertRows(#"Previous Step Name", 0 (This is the offset),{[Column 1= "data1", column2= "data2",......column27 = "data27"]})
KevinSanDiego
Frequent Visitor

I know this is an old post but I did find the solution on another post so I'll reference it here just in case someone else comes across this post and not the other one:

 

https://community.powerbi.com/t5/Desktop/Adding-a-row-manually-to-manually-created-table/td-p/58154

 

Sean
Community Champion
Community Champion

If you need to add more rows of data you need to add it to your source and then refresh.

 

This is the only means?

Actually, you can define a table in the query editor and append that to your other table:

 

Table.FromRows({{1, "Bob", "123-4567"} , {2, "Jim", "987-6543"}}, {"CustomerID ", "Name", "Phone"})

 

https://msdn.microsoft.com/en-us/library/mt260791.aspx

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

@ImkeF

 

I'm trying to apply your suggestion however I'm not getting the Power BI accuses error in the script, how could I apply your suggestion in my code?

Untitled.png

You need to fill in your data at the respective places. I think a look into the documentation will give you some guidance here.

 

If you are a beginner, it would probably be easiest to create a separate table and append (like here: https://support.office.com/en-ie/article/Append-queries-Power-Query-e42ca582-4f62-4a43-b37f-99e2b2a4... ).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors