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! Request now

Reply
PaulTrower01
New Member

Dynamic URL based on a measure's value as a data source

Hi,

 

I would like to dynamically change the number "22" in the URL below as a data source.

 

Json.Document(Web.Contents("https://fantasy.premierleague.com/api/entry/17122/event/22/picks/"))

 

I have a measure that gives me the number I need "MAX('Dim Gameweeks (events)'[Next Gameweek Number]) - 1" but I don't know if it is possible to use that value in the URL string?

 

Thanks,

Paul

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PaulTrower01 ,

 

Currently I'm afraid that's not possible.

 

You can create a parameter to replace part of the number in the URL.

vdengllimsft_1-1737523412738.png

 

Dynamic M Query Parameters allows you to bind a field to a parameter so that a single field value can be passed dynamically to the parameter.

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
However, this only applies to tables in Direct Query connection mode and does not apply to measures.
Instead, tables created through the Web Connector are in Import connection mode.


Therefore, you can only change the data source manually by changing the parameter values.

vdengllimsft_0-1737523337163.png


Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @PaulTrower01 ,

 

Currently I'm afraid that's not possible.

 

You can create a parameter to replace part of the number in the URL.

vdengllimsft_1-1737523412738.png

 

Dynamic M Query Parameters allows you to bind a field to a parameter so that a single field value can be passed dynamically to the parameter.

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
However, this only applies to tables in Direct Query connection mode and does not apply to measures.
Instead, tables created through the Web Connector are in Import connection mode.


Therefore, you can only change the data source manually by changing the parameter values.

vdengllimsft_0-1737523337163.png


Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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