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
Anonymous
Not applicable

Merge datas on the same table with table.combine "unable to convert table to list"

Hello,


I have created a power query function named "AppAPIServices" to execute operations on an API.

And I have created a request to call this function more times with different periods (start Time and EndTime parameters).

The content of this request is :
////////////////////////////////////////////////////
// Define timeframe DayByDay from now for last 28 Days
////////////////////////////////////////////////////
Now = DateTime.LocalNow(),
StartDate = Date.AddDays(Now, -28),
TimeFrame24H = List.Generate(()=>StartDate, each _ < Now, each Date.AddDays(_,1)),
ConvertToUnixFormat = List.Transform(TimeFrame24H, each Duration.TotalSeconds(Date.AddDays(_,1) - DateTime.FromText("1970-01-01 02:00:00"))),
ConvertToRightFormat = List.Transform(ConvertToUnixFormat, each (Int64.From(_)*1000)),


TableInit = AppAPIServices((tenant), (token), Number.ToText(ConvertToRightFormat{0}), Number.ToText(ConvertToRightFormat{1})),
TableInit2 = AppAPIServices((tenant), (token), Number.ToText(ConvertToRightFormat{1}), Number.ToText(ConvertToRightFormat{2})),

new = Table.Combine(TableInit, TableInit2),

If I try to execute this request,
"TableInit" is a table with the datas of 30 May :

2019-06-26_09h16_35.png

"TableInit2" is a table with the datas of 31 May
2019-06-26_09h17_53.png


After, I want to merge the data of 30 May and 31 Mays on the same table through "Table.combine" but I encounter the error :
Expression.Error : Sorry unable to convert a value of table type to a list type
Details :
Value=Table
Type=Type
2019-06-26_09h18_37.png


Could you help me to merge my data on the same table to return it ?


Please be comprehensive, I'm newbie on PowerBI Desktop.
Thank you.
Regards Aurelien.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous ,

 

Please modify the table.combine step as follow:

new = Table.Combine({TableInit, TableInit2}),

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Anonymous ,

 

Please modify the table.combine step as follow:

new = Table.Combine({TableInit, TableInit2}),

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.