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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors