Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone
I have some data that i get from a API call, name, id, domain... and i need take that id and call to another API. Im following that video https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/
thats how my query looks
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content)],
[Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
When i try to do that i get the next error
Expression.Error: Se han pasado 3 argumentos a una función que espera entre 1 y 2.
Detalles:
Pattern=
Arguments=[List]
How can i solve it?
Thanks u
Hi @yebenesPW ,
you need to include the Query as another record field in the first record. So removing some brackets should do the job here:
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content), Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.