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 September 15. Request your voucher.

Reply
wasim123
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. 

4 REPLIES 4
mohammedadnant
Impactful Individual
Impactful Individual

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,

mohammedadnant_0-1615806291014.png

 

 

Thanks & Regards,

Mohammed Adnan

https://www.youtube.com/c/taik18

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

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18

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 ,

 

v-lionel-msft_0-1615962002780.png

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

Please submit your idea.

Ideas (powerbi.com)

 

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.

 

amitchandak
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 -https://www.youtube.com/watch?v=XIq5vN5oPf8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.