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
twilbour
Helper I
Helper I

Error: We cannot convert a value of type Table to type List

I have a multi file, multi sheet query.  Once I have all the data combined, I want to duplicate certain rows from the data set, and append back to the list..  I have managed to create the table of duplicate rows I want, but the append step fails. The error is:  Expression.Error: We cannot convert a value of type Table to type List.  Details: Value=[Table] Tyep = [Type].    All the steps work until the append step.  Below is my code:

 

let
Source = Folder.Files("U:\LifePoints Reporting\EOM Reporting"),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Content", "Name"}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Removed Other Columns", "Name", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, true), {"Name.1", "Name.2"}),
#"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Name.1", type text}, {"Name.2", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Name.1"}),
#"Split Column by Delimiter1" = Table.SplitColumn(#"Removed Columns", "Name.2", Splitter.SplitTextByEachDelimiter({"."}, QuoteStyle.Csv, true), {"Name.2.1", "Name.2.2"}),
#"Removed Columns1" = Table.RemoveColumns(#"Split Column by Delimiter1",{"Name.2.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Removed Columns1",{{"Name.2.1", type date}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type1", each Date.IsInPreviousNMonths([Name.2.1], 2)),
#"Filtered Hidden Files1" = Table.SelectRows(#"Filtered Rows", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type2" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Cash Received", type number}, {"Billing Price Home", type number}, {"Balance", type number}, {"Date", type date}, {"Panel", type text}}),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Changed Type2", {"Date"}),
#"Filtered Rows1" = Table.SelectRows(#"Removed Errors", each true),
#"Filtered Rows2" = Table.SelectRows(#"Filtered Rows1", each Date.IsInPreviousNMonths([Date], 1)),
#"New Table" = Table.SelectRows(#"Filtered Rows2",each [Cash Received] <> null),
#"Removed Columns2" = Table.RemoveColumns(#"New Table",{"Cash Received"}),
#"Append Query" = Table.Combine(#"Filtered Rows2",#"Removed Columns2")
in
#"Append Query"

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Your Table.Combine syntax is wrong. It requires a list of tables, not just the table names. Change it to:

#"Append Query" = Table.Combine({#"Filtered Rows2",#"Removed Columns2"})

Note the {} brackets.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

Your Table.Combine syntax is wrong. It requires a list of tables, not just the table names. Change it to:

#"Append Query" = Table.Combine({#"Filtered Rows2",#"Removed Columns2"})

Note the {} brackets.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@twilbour - was this helpful?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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