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

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.