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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ViralGajjar2904
Frequent Visitor

How to Dynamically update a parameter value based on data from a client’s website to PowerBI Desktop

I am currently working on a Power BI Desktop project where I need to dynamically update a parameter value based on data from a client’s website. The goal is to have this parameter value automatically refresh without manual intervention to reflect changes from the client’s webpage.

Here is the scenario:

  1. I have a base URL parameter in my Power BI report.
  2. This base URL needs to be dynamically updated based on a value retrieved from the client’s website.
  3. The client’s website is built using React.js.
  4. I need this update to occur seamlessly within Power BI Desktop and eventually extend this functionality to scheduled refreshes when published to Power BI Service.
  5. I have tried setting up a parameter in Power BI Desktop and manually updating it, but I need a solution that automates this process.

    I appreciate any guidance or solutions you can provide to help achieve this dynamic parameter update within Power BI Desktop.

    Thank you.

Steps Taken:

1 ) Fetch Data from Client's API:

let BaseURL = "https://api.example.com", body = "{""sessionId"": ""efac9d4b-7bd9-4efc-80fd-cb623b076da4"", ""isSearch"": false, ""keyword"": """", ""exploreType"": 2}", Source = Json.Document(Web.Contents(BaseURL, [ RelativePath = "/testAPI/explorer/location_hierarchy", Content = Text.ToBinary(body), Headers = [#"Content-Type" = "application/json"] ])), #"Converted to Table" = Record.ToTable(Source), Value = #"Converted to Table"{1}[Value], #"Converted to Table1" = Record.ToTable(Value), Value1 = #"Converted to Table1"{0}[Value], #"Parsed JSON" = Json.Document(Value1), #"Converted to Table2" = Record.ToTable(#"Parsed JSON"), #"Expanded Value" = Table.ExpandListColumn(#"Converted to Table2", "Value"), #"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"EntID", "EntityName", "Name", "Description", "Type", "Icon", "Room"}, {"EntID", "EntityName", "Name.1", "Description", "Type", "Icon", "Room"})

in #"Expanded Value1"

  1. Create Specific Reports:

  2. Create Parameter in Power BI Report: Set up a parameter in the Power BI report to dynamically change the base URL or any other required parameters based on the fetched data. Used Power Query parameters and updated them as needed to ensure the data fetch logic uses the latest values.

  3. Publish Report to Power BI Service:

1 REPLY 1
ThxAlot
Super User
Super User

An indirect way I can think of is to place the parameter in a SharePoint list (or any place where your report is entitled to access); so that when the parameter changes, the API request generated in PQ is changed accordingly.



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.