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
VIPDRE
Regular Visitor

What if datasource via Json API has a required parameter?

I access my datasoudatasource via a Json API. One of the queries has a required parameter for a date-time field in the format YYYY-mm-dd.

 

How do I pass a parameter value so that I can preview the data in Query Editor?

My ultimate goal is to automagically pass the value for the date the query was last refreshed.

Here is the string

= Json.Document(Web.Contents("https://survey.XXXXX.com/api" & "/answers", [Timeout=#duration(0, 0, 3, 0), Headers=[#"x-api-key"="123456789"]]))

 

Thoughts?

 

 

Screenshot 2020-09-17 135440.png

1 REPLY 1
lbendlin
Super User
Super User

Power BI has no memory.  Store your parameter in an external table (SQL, Sharepoint List, Excel etc) and use that as an additional data source.  You can write back to that data source with View.NativeQuery, or you can control the dataset refresh completely from the external system (for example via Power Automate).

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 community update carousel

Fabric Community Update - June 2025

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