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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
thatfield
Regular Visitor

Can I filter a DirectQuery using a user supplied parameter

Hello,

 

I'm working on building a report that is looking at a rather large dataset. However, my users do not need to see the entire dataset at one time, instead they only want to see records for a specific property. I'm still new to PowerBI but in Business Objects I was able to force the user to select a value for a given parameter before the query was sent to the database, am I able to do something similar in PowerBI?

 

This is an example of what I am hoping to be able to do in PowerBI, it prompts the user for a parameter before even querying the data in the database.

 

thatfield_0-1660244241284.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @thatfield ,

Please check if the following methods can help you achieve your requirement.

1. URL filter

https://app.powerbi.com/groups/me/reports/8d6e300b-696f-498e-b611-41ae03366851/ReportSection3?filter=Store/TerritoryChain eq 'NC – Lindseys'

2. User editing of DirectQuery query parameters

yingyinr_0-1660721006425.png

3. RLS

Filter a directQuery with parameter and apply parameter change within URL call (PBIRS sept2021)

Unfortunately what you are trying to do is not possible. Currently the parameters in a query can only be changed at "design time" (while editing in Power BI Desktop) and cannot be changed dynamically while viewing a report. 

 

One other approach would be to include all the rows from your User table, then apply the url filter using the filter= syntax as documented here https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters 

 

Another approach could be to look at using Row Level Security to filter the user table, but you would need to have some way of mapping to a login to one of your user ids in order to do that.


Best Regards

lbendlin
Super User
Super User

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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