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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.