Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello Everyone, my first question here 🙂
I have a query which give tables space (size) details in a database on a server. We have got many databases under that server.
Now, in Power BI, the SQL query takes servername and db name as parameters in connection details. I would like to pass the db name and server name from a slicer to the connection parameters of the sql query, so that the query returns the table space information based on the slicer values selected of server name and dbname.
I tried implementing that but its not working. Please guide.
I’m afraid that the values of a slicer are not able to be passed to the connection parameters of a sql query currently. When using Power BI, the working logic is first connecting to data in data sources where connection info is used. Then you may perform some data transformation work in Power Query Editor. After applying all the changes in Query Editor and go to Power BI desktop, you can create reports by using visualizations and measures, etc. So when you use a slicer, it interacts with data from an established fixed data source connection and cannot change data source at this report layer dynamically.
I created a parameter Database in Power Query Editor and load it to Desktop to check its value. As shown below, it only contains its current value rather than the value list.
So you may consider generating the details as well as server names & db names into a new table or view at your database side in advance if possible. Then get data from this table in Power BI and put server names & db names fields into a slicer.
Additionally, reference for differences between power query parameters and what if parameters:
https://radacad.com/power-query-parameters-vs-what-if-parameters-power-bi-implementation-use-cases
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
@jyotmishra15 - Check the below if this can help you.
Appreciatre your kudos!! Mark my post as solution if this helps.
@jyotmishra15 , I doubt you can use the slicer. Check if this can work -https://radacad.com/change-the-source-of-power-bi-datasets-dynamically-using-power-query-parameters
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.