Forum Discussion
PowerBI API call with loop
- 5 years ago
Hi Anonymous ,
Sorry for editing the original reply, after deep research, I have some new solution for your issue. You need to use text. from binary to parse content return by web.content. So you need to change your function to
let CallAPI= (EAN as text, optional Timeout as number) as any => let WebTimeout = if Timeout = null then #duration(0,0,0,100) else #duration(0,0,0,Timeout) , WebResponse = Text.FromBinary(Web.Contents("https://www.ealyze.nl/api/ean/innerdayvalues/format/csv/key/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/start/20210401/code/" & EAN, [Timeout = WebTimeout])) in WebResponse in CallAPIPlease try again.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi Anonymous ,
Sorry for editing the original reply, after deep research, I have some new solution for your issue. You need to use text. from binary to parse content return by web.content. So you need to change your function to
let
CallAPI= (EAN as text, optional Timeout as number) as any =>
let
WebTimeout = if Timeout = null then #duration(0,0,0,100) else #duration(0,0,0,Timeout) ,
WebResponse = Text.FromBinary(Web.Contents("https://www.ealyze.nl/api/ean/innerdayvalues/format/csv/key/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/start/20210401/code/"
& EAN, [Timeout = WebTimeout]))
in
WebResponse
in
CallAPI
Please try again.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai