cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roymunoz03
Frequent Visitor

Help merging multiple API calls into POwerBI

Hello, I need help with the syntax to succesfully merge multiple API calls into ONE single query. I know I can use the merge function, but that requires having 2 tables I believe. I do not want to have multiple tables and then merging, I would like to directly get ONE SINGLE query that involve multiple API calls. 

 

Here is an example of what I am trying to do:

 

let
    Source = Json.Document(Web.Contents("https://api-v2.intrinio.com/securities/AAPL/historical_data/52_week_high?frequency=daily&start_date=...")),
    #"Converted to Table" = Record.ToTable(Source),
    Value = #"Converted to Table"{0}[Value],
    #"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"date", "value"}, {"date", "value"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"value", "High"}})
in
    #"Renamed Columns"
 
MERGE SYNTAX???

    let
    Source = Json.Document(Web.Contents("https://api-v2.intrinio.com/securities/AAPL/historical_data/52_week_high?frequency=daily&start_date=...")),
    #"Converted to Table" = Record.ToTable(Source),
    Value = #"Converted to Table"{0}[Value],
    #"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"date", "value"}, {"date", "value"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"value", "High"}})
in
    #"Renamed Columns"
1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @roymunoz03 ,

Can you please post some sample data and the expected output? Maybe we can find a workaround using some formulas to implement it. For now, there is not a proper way to implement directly.

 

Best Regards,

Xue

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors