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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors