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
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
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