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
Asantos2020
Advocate II
Advocate II

Pass Users' Parameter into json query url

Hello,

 

I'm not sure I've found a definite No to this.

I am pulling data via a url, but this needs to have its StartDate defined by a parameter where the user can define the number of months back the data is supposed to be.

So, accessing the report today, the data should be from July/28th to Nov/28. 

I've been trying to pass a Query Parameter below, but although the Current Value says it's 4, I'm getting data from the whole year:

 

Json.Document(Web.Contents("https://api.com.br/Server_2.0.0_api/PBI/documents/data?FromDate="&Date.ToText(DateTime.Date(Date.Add...(), -MonthParameter)))&"&ToDate="&DateTime.ToText((DateTime.LocalNow()), "yyyy-MM-dd")&"", [Headers=[Accept="application/json", Authorization="Bearer eyJhbGciOiJ..."]]))

 

How to have the user have access to this parameter on Power BI Service?

 

Cheers,

Antonio Santos

1 REPLY 1
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Asantos2020 

 

look at this.

https://community.powerbi.com/t5/Desktop/PowerBI-Desktop-report-based-on-a-query-with-1-parameter-ho...

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


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.

Users online (17,016)