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.
Hi,
I succeed to get some data in Power Query though api call, but not get all data.
Now I'm trying to create a loop to get all the API data from Zendesk, but its not working. I get the error "We cannot convert a value of type List to type Number." This is the Query:
let
Page = {1,1000},
Source = Json.Document(Web.Contents("https://xxxxxxx.zendesk.com/api/v2/tickets.json?page="&Number.ToText(Page), [Headers=[Authorization="Basic ZGlxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]])),
#"Converted to Table" = Table.FromRecords({Source}),
List = List.Generate(() =>
[Result= try GetData(1) otherwise null, Page = 1],
each [Result] <> null,
each [Result = try GetData([Page]+1) otherwise null, Page =[Page]+1],
each [Result])
in
#"Converted to Table"
Can somebody tell me what is wrong with the code i'm using? I tried a lot of methods, but with no success.
Solved! Go to Solution.
Hi @Leggies ,
Please create a new table with all page values and then refer to this blog to use column as parameter to return all needed values:
Use Column as Parameter for Custom Function in Pow... - Microsoft Power BI Community.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Leggies ,
Please create a new table with all page values and then refer to this blog to use column as parameter to return all needed values:
Use Column as Parameter for Custom Function in Pow... - Microsoft Power BI Community.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Leggies , For relative path, refer try this
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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |