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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
shashi_bagale
New Member

Use of Slicers for Database Selection in front Report Page

I am building a Power BI report connected to a single SQL Server (SSMS) that hosts multiple databases, where each database corresponds to a different product company (PC).

  • The report has 4 pages having Visuals like, Column chart, Tables and Bookmarks and uses around 10 tables per database.
  • The data model is composite:
    • Fact tables → DirectQuery (real-time)
    • Dimension tables → Import mode
  • Each database has different credentials (user/password).
  • The requirement is:
    • To have a landing page in the report with a slicer listing all PCs.
    • When a user selects a PC, the report should automatically connect to that PC’s database (with correct credentials), and all 5 pages should update accordingly.

Constraint: I do not want to load data from all PCs/databases at once, because each DB is large and only one should be queried at a time.

The core question:

Is it possible in Power BI to dynamically switch the DirectQuery database connection at runtime using a slicer?

If not, what would be the best alternative approach to achieve this requirement without preloading all databases into the model?

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Unforntunately, what you're asking for isn't possible. The query editor affects the designer but it isn't the other way around - slicer selection doesn't get passed on the the query editorr.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

10 REPLIES 10
danextian
Super User
Super User

Unforntunately, what you're asking for isn't possible. The query editor affects the designer but it isn't the other way around - slicer selection doesn't get passed on the the query editorr.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you for the reply..🙂

Thank you for the reply...🙂

shashi_bagale
New Member

@jaineshp Thanks for the super qucik reply🙂. That means I still have to load all the data from the source..

Hi @shashi_bagale  ,

I would also take a moment to thank @jaineshp  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 

Hi @shashi_bagale ,

I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you

 

 

Hi @shashi_bagale ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions

Hey @v-sshirivolu,

Thank you for the kind recognition - always happy to contribute to our community's success!

Best Regards,
Jainesh Poojara | Power BI Developer

Yes, that's the only way!

Best regards,
Jainesh Poojara / Power BI Developer

jaineshp
Memorable Member
Memorable Member

Hey @shashi_bagale,

 

No, Power BI cannot dynamically switch DirectQuery connections at runtime using slicers. The data source connections are fixed at report design time.

 

Alternate Option: Multiple Report Approach

  • Create separate .pbix files for each PC database
  • Build a master landing page with PC slicer
  • Use report navigation/drill-through to open respective PC reports
  • Each report connects to its specific database with proper credentials

Fixed? ✓ Mark it • Share it • Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors