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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

How to dynamically get data from the table based on query string parameters in the Power BI URL

Requirement:

I have a requirement which should let the user to analyze data from Power BI dataset hosted on Power BI Services based on the table name passed as query string parameter in the report URL.

Current solution in progress:

I have 2 datasets:

  1.  DataTable: This is the actual table that user wants in Power BI Services to perform analysis and it needs to load the data dynamically based on user's table selection. Dataset  looks like "select * from tablename", where tablename is the query string parameter passed by the user in report URL.
  2. ListTables: This has a single column containing the list of tables and the value from this dataset will be used by the user as query parameter in report URL to pass the tablename.

URL looks like; ReportURL?filter=ListTables/Names eq 'Table Name' . I thought M query modified as shown below would work.

User will open the report url with parameters, click on edit , it would load the required table (direct query) and be ready for  analysis.

SnehaJo_0-1603989194174.png

Problem is that the query parameter URL only filters the "ListTables" but won't pass the filtered value from "ListTables" to the "DataTable"  for it to run the select statement.
I assumed since "ListTables" gets filtered with single value (table name passed by user), this would be the only and first value in that table and it will work as expected with M query's Table.FirstValue function. 

But Power BI Services loads both the tables at once and then filters the data. This solution is not working.

I hope I was able to describe my usecase. Any help would be greatly appreciated.

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

You can use Query Parameters to get the data from different tables by dynamic, please find the details in the following links.

Dynamic Power BI reports using Parameters

Power BI Desktop Query Parameters

How to Use & Update Parameters in the Power BI Service

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

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors