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
peterson191
Regular Visitor

How to union intermediate tables in Power Query?

Hi Power BI Gurus,

 

How to union intermediate tables in Power Query? My sample is as below:

 

I am crawling data from some web pages. For each page, there will be a table. But I do not want to do with that multiple times. Power query allows me to take all the different web table into some intermediate tables, but when I combine these tables, the error reported as: 

Expression.Error: we cannot convert type table to type list.
Details:
Value=[Table]
Type=[Type]

 

Here is my M codes (only the last step in let block reported error as above):

 

 

 

let
...

type_changed_1_1 = Table.TransformColumnTypes(提升的标题1,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_2 = Table.TransformColumnTypes(提升的标题2,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_3 = Table.TransformColumnTypes(提升的标题3,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_4 = Table.TransformColumnTypes(提升的标题4,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_5 = Table.TransformColumnTypes(提升的标题5,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_6 = Table.TransformColumnTypes(提升的标题6,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_7 = Table.TransformColumnTypes(提升的标题7,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_8 = Table.TransformColumnTypes(提升的标题8,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_9 = Table.TransformColumnTypes(提升的标题9,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_10 = Table.TransformColumnTypes(提升的标题10,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_11 = Table.TransformColumnTypes(提升的标题11,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),
type_changed_1_12 = Table.TransformColumnTypes(提升的标题12,{{"日期", type date}, {"质量等级", type text}, {"AQI指数", Int64.Type}, {"当天AQI排名", Int64.Type}, {"PM2.5", Int64.Type}, {"PM10", Int64.Type}, {"So2", Int64.Type}, {"No2", Int64.Type}, {"Co", type number}, {"O3", Int64.Type}}),

CombinedTable = Table.Combine(type_changed_1_1,type_changed_1_2,type_changed_1_3,type_changed_1_4,type_changed_1_5,type_changed_1_6,type_changed_1_7,type_changed_1_8,type_changed_1_9,type_changed_1_10,type_changed_1_11,type_changed_1_12)

in 
CombinedTable

 

 

 

 

1 ACCEPTED SOLUTION
Jimmy801
Community Champion
Community Champion

Hello @peterson191 

 

you need a list when feeding Table.Combine, not every table as seperate parameter. So this step has to look like this

CombinedTable = Table.Combine({type_changed_1_1,type_changed_1_2,type_changed_1_3,type_changed_1_4,type_changed_1_5,type_changed_1_6,type_changed_1_7,type_changed_1_8,type_changed_1_9,type_changed_1_10,type_changed_1_11,type_changed_1_12})


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy 

View solution in original post

3 REPLIES 3
Jimmy801
Community Champion
Community Champion

@peterson191  - great to hear that 🙂

Jimmy801
Community Champion
Community Champion

Hello @peterson191 

 

you need a list when feeding Table.Combine, not every table as seperate parameter. So this step has to look like this

CombinedTable = Table.Combine({type_changed_1_1,type_changed_1_2,type_changed_1_3,type_changed_1_4,type_changed_1_5,type_changed_1_6,type_changed_1_7,type_changed_1_8,type_changed_1_9,type_changed_1_10,type_changed_1_11,type_changed_1_12})


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy 

@Jimmy801 Thank you. You really make my day!!!

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
Top Kudoed Authors