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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Using Parameters to bring dynamic data

Hi, We have a table which is terribly large so we want to bring in only the data that matches what a user clicks on in a table.

I've created the Data Parmeter, and my M Code shows the parameter is by default filtering data. Using my default in the parameter, it works fine.

MRUry7_0-1708700689196.png

How do I get it so that when a user clicks on a URL field in a table, the URL they select replaces the value in this parameter, so any URL the click on, the data is filtered?

I've seen a few of the examples out there but I can't seem to get it working for my particular need. Any help is appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1.  Create query parameter

vyiruanmsft_1-1708939892833.png

2. Add filter

= Sql.Database("xx", "xx", [Query="select * from xx where Page_URL='"&Page&"' "])

vyiruanmsft_0-1708939803695.png

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn

Solved: Use table values as a parameter - Microsoft Fabric Community

3. Change the parameter name

vyiruanmsft_2-1708940030279.png

vyiruanmsft_3-1708940086189.png

Best Regards

View solution in original post

7 REPLIES 7
lbendlin
Super User
Super User

Are you running Power BI RS?

Anonymous
Not applicable

not sure what is PowerBI RS? Currently on desktop version september 2023..

There are two different Power BI Desktop versions. One "regular" version for publishing to the Power BI Service, and one Power BI Desktop RS  for publishing to on-premise Power BI Report Server.  The latter has reduced functionality.

Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1.  Create query parameter

vyiruanmsft_1-1708939892833.png

2. Add filter

= Sql.Database("xx", "xx", [Query="select * from xx where Page_URL='"&Page&"' "])

vyiruanmsft_0-1708939803695.png

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn

Solved: Use table values as a parameter - Microsoft Fabric Community

3. Change the parameter name

vyiruanmsft_2-1708940030279.png

vyiruanmsft_3-1708940086189.png

Best Regards

Anonymous
Not applicable

Thanks for sending this, but how would you set it up so that a user can click a selection from a filter or table and have the filtering occur, based on which one the user chooses?

lbendlin
Super User
Super User

Anonymous
Not applicable

But this will work for Databricks queries as well, correct?

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.