Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How can we add multiple T-Sql queries under one connection in PBI Desktop

Hello All, I'm relatively new to Power BI.

I am creating a PBI report for which I need to write mutiple Sql queries to get my dim and fact tables.

I'm creating a new connection everytime to write my sql query, is there any option by which I can write sql query in existing connection rather than creating new connection everytime.

Like in SSRS where you create one connection and can add many dataset under that connection.


Note:- When I select existing connection it is taking me to Table/view names and there I'm not finding any option for wrtitng sql query. 

Responsive Resident
Responsive Resident

Hi @wasim123 


Good day,

If you create view in SQL and then use in Power BI then, 

you have an option to use existing connection, it is under Home Tab on top ribbon --> Recent Sources

you can select the recent connected sources in Power BI,




Thanks & Regards,

Mohammed Adnan

Thank you, but in recent sources it takes you to directly tables/view where you don't get any option of writing sql queries, writing sql queries option appears at time of making new connection.

Hi @wasim123 ,



As tested, current version is impossible to realize the idea.

Please submit your idea.

Ideas (


Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


Super User
Super User

@wasim123 , I think if you want to give query then you can give it while creating a connection.

Refer to this video from guyinacube to use parameter for connection -

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!