cancel
Showing results for 
Search instead for 
Did you mean: 
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
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,

mohammedadnant_0-1615806291014.png

 

 

Thanks & Regards,

Mohammed Adnan

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

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

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