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

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.