Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.