question

Robin-1355 avatar image
0 Votes"
Robin-1355 asked DSPatrick answered

PowerBI API call with loop

Hi all,

i'm trying to accomplish to get all data from 6 different URL's into one table.
The URL's need to be generated based on a list. So far i fail to understand all the examples on the internet, so i'm hoping someone can tell me what i'm doing wrong.

I get data from the Web using this URL:
https://www.ealyze.nl/api/ean/list/format/csv/key/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
So far so good, data comes in i see the different EAN numbers. Now to get detailed info on these EAN numbers, i need to call this URL:
https://www.ealyze.nl/api/ean/innerdayvalues/format/csv/key/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/start/20210401/code/8716948310004

So i did the following steps

  • Converted the EAN column to a List

  • Created a parameter called pEAN

  • Created a function called CallAPI

  • Invoked the function to the table containing the EAN number

And then i only see a new column named CallAPI with rows Binary :(
How can i convert the binary to columns?

This is the function i use

 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 = Web.Contents("https://www.ealyze.nl/api/ean/innerdayvalues/format/csv/key/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/start/20210401/code/" 
         & EAN,  [Timeout = WebTimeout])
     in
         WebResponse
 in
     CallAPI

95054-callapi.png


not-supported
callapi.png (32.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered

Power Bi is not currently supported here on QnA. The product group for Power Bi actively monitors questions over at
https://community.powerbi.com/

--please don't forget to Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.