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.
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 :
"TableInit2" is a table with the datas of 31 May
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
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.
Solved! Go to Solution.
Hi @Anonymous ,
Please modify the table.combine step as follow:
new = Table.Combine({TableInit, TableInit2}),
Best regards,
Yuliana Gu
Hi @Anonymous ,
Please modify the table.combine step as follow:
new = Table.Combine({TableInit, TableInit2}),
Best regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
96 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |