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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Smile
Frequent Visitor

Converting List to Table to insert more rows using Power Query

Hi all, 

 

I pulled 14 records from the Amazon Redshift database and wanted to add 2 rows using Power Query. 

The below is the power query I used:

 

let
(1) - Source = Value.NativeQuery(AmazonRedshift.Database("SQL QUERY AND DATABASE HERE'", null, [EnableFolding=true]),
(2) - InsertFirstRow = Table.InsertRows(Source, 15, "Incomplete")
in
InsertFirstRow

 

After (1), it give me the 14 records with employee name and their assigned territories (as an example):

NameTerritory IDTerritory Name
A1Utopia
B2Hell

 

However, as soon as I tried add another row, it came up with the error as below:

Expression.Error: We cannot convert the value "Incomplete" to type List.

Details:

Value = Incomplete

Type = [Type]

 

I thought the data that gets exported from the database would be in the form of table, not list in power bi file. 

Could you please advise how I can address this issue?

 

Thank you!

1 REPLY 1
HotChilli
Community Champion
Community Champion

Source is a table, nothing wrong with that part.

However, the 3rd parameter of  Table.InsertRows is a list which is supposed to be made up of the data values to populate the row.  The code you have shown is just trying to insert a string - "Incomplete".

See https://learn.microsoft.com/en-us/powerquery-m/table-insertrows 

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.