Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am new to getting datat from an API. There are a few challenges I am facing.
1) I can get the data using specific paramaters, but want to use a reference table to call the API for each parameter such as date.
2) I am trying to get multiple dates and associated records into one table - Dont want to do this manually. Is there a function that can use a table as a list to replace the value and add each API call as a record in teh same table
let
Source = Json.Document(Web.Contents("https://api.sportsdata.io/v3/nba/projections/json/DfsSlatesByDate/2020-MAR-08?key=###MYKEY###")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"SlateID", "Operator", "OperatorSlateID", "OperatorName", "OperatorDay", "OperatorStartTime", "NumberOfGames", "IsMultiDaySlate", "RemovedByOperator", "OperatorGameType", "SalaryCap", "SlateRosterSlots", "DfsSlateGames", "DfsSlatePlayers"}, {"Column1.SlateID", "Column1.Operator", "Column1.OperatorSlateID", "Column1.OperatorName", "Column1.OperatorDay", "Column1.OperatorStartTime", "Column1.NumberOfGames", "Column1.IsMultiDaySlate", "Column1.RemovedByOperator", "Column1.OperatorGameType", "Column1.SalaryCap", "Column1.SlateRosterSlots", "Column1.DfsSlateGames", "Column1.DfsSlatePlayers"})
in
#"Expanded Column1"
My Second Challenge is calling the API when there are two variables such as date and ID, Even when I do this for one manual API call the data table needs to be pivoted so the field names are columns.
1)Need to dynamically pass dates and ID's into the API Call basedon an existing tables as the list of values for each
2)Need to pivot the results as columns
let
Source = Json.Document(Web.Contents("https://api.sportsdata.io/v3/nba/projections/json/PlayerGameProjectionStatsByPlayer/2020-MAR-08/20000877?key=###MYKEY###"))
in
Source
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
55 | |
37 | |
35 |
User | Count |
---|---|
85 | |
66 | |
59 | |
46 | |
45 |