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

Join 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.

Reply
wkeicher
Helper III
Helper III

Passing two Parameters into WEB API (Dates) & (ID)

I need help in passing a date and a range of assoicated ID's from a table into API Calls in a looping fashion. 

  • Date = Today-1 (need this to be flxible - maybe today - 7) - Comes from a table called SportsIOSlates[Dates]
  • Associated IDs to that date -  are then treated as a list that correspond to that date (i.e filtered), then pass that list of Ids and the dat into the following API structure. The list of ID's come from a table called SportsIOSlates[PlayerID]
  • Output will be a table of ID's and assocaited fields from the API

The below is based on using that API call in a singular fashion.

let
Source = Json.Document(Web.Contents("https://api.sportsdata.io/v3/nba/projections/json/PlayerGameProjectionStatsByPlayer/2020-01-07/20001573?key=MYKEY")),
#"Converted to Table" = Record.ToTable(Source),
#"Pivoted Column" = Table.Pivot(#"Converted to Table", List.Distinct(#"Converted to Table"[Name]), "Name", "Value")
in
#"Pivoted Column"

 

 Thank you

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @wkeicher 

 

kindly refer to this similar thread:

https://community.powerbi.com/t5/Desktop/How-to-create-parameter-for-dynamic-date-parameter-in-json-... 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@wkeicher 

Refer, if this can help

https://radacad.com/category/power-bi-rest-api

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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