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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to pass dynamic parameter to the JSON as a data source

Hi,

 

I'm accessing the REST API URL as a direct query data source through the CData Power BI Connector for REST but the current URL has a hard coded value but how could I pass parameter dynamically in the power bi.

 

I have created 2 columns in the schema (JSON) which can be used as a parameter- pease see the below

<input name="effectiveDate" required="true"/>
<input name="prodId" required="true"/>

 

and change the URL to http://hotsname/sources/DimSales?rs:effectiveDate=[_input.effectiveDate]&rs:prodId=[_input.prodId]&rs:pageSize=10000&rs:pageNumber=1" 

 

And also created Parameters in the Power BI with the same names (effectiveDate, ProdId) but got the below error.

REST PBI error.PNG

 

Any suggestion would be much appriciated,

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found that, Currently it is not possible to pass the query level parameters from the Power BI Service either Embedded URL or Report URL. 

 

Please vote for the idea 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-pa...

 

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Do you create query parameter in Edit queries?

If so, when using parameter in URL, you could refer to the similar threads below:

https://community.powerbi.com/t5/Power-Query/Parameters-for-JSON-API-data-Maintain-Query-daily/m-p/1...

https://community.powerbi.com/t5/Desktop/How-to-pass-a-dynamic-date-parameter-in-the-json-api-in-pow...

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

@v-juanli-msft , Thanks for your inputs, 

 

With the Power BI Service URL query string parameters will filter the report, but they will not change report parameter values, i.e. it will not re-execute the data source with the values passed in the URL.

 

Plese see the below an overview of my target.

I'm using the Datasource : REST API i.e http://ABC/datasources/Products?rs:Date=2020-01-02 and its running fine and getting data as i am passing all parameters dynamically but It is not pulling the data by changing the URL parameter once I Published the Report to Power BI Service .

 

I'm not sure whether, this can be achieved as of my knowledge Power BI Query string parameters are for filtering the data and it will not re execute the datasource to get new data.

Anonymous
Not applicable

I found that, Currently it is not possible to pass the query level parameters from the Power BI Service either Embedded URL or Report URL. 

 

Please vote for the idea 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-pa...

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors