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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
ppgandhi11
Helper V
Helper V

Is it possible to execute more than one SQL in power bi?

Hi,

 

I execute a sql statement to build my first universe and work off of it in power bi. During subsequent steps, I need to connect to database and execute another sql that would have parameter passed by the visual already created by first universe.

 

Is it possible to connect to database again and execute another sql ?  

4 REPLIES 4
ppgandhi11
Helper V
Helper V

@MFelix

 

Thanks for the reply. I am using Power BI Desktop July 2018 release. Can you please tell me how to go about it? screenshot would help about this functionality. I do not see anything that is called "advanced editor" at my end. Thanks again!

The only advanced editor i see is in edit query section which i have already used. It has my original query that brings the universe of data. What i want is, to run another sql based on the visual I have created using original universe. I should be able to pass the field values to the new query and expect a new universe based on that. Thanks!

Hi @ppgandhi11,

Yes I'm refering to the advance query editor and in there you can have more than one SQL.

However your post made me question what is your expected result. To what I could understand you have some data universe and based on that you have made some visuals now you want to pass the resultd from those visuals as a parameter a new SQL?

Is this correct? Can you please elaborate on what you are trying to do and expected results.

Regards,
MFelix

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @ppgandhi11,

 

This is possible in PBI however you have to use the advance editor to make the connection to different SQL and then make the merge or apppend of the two SQL queries, but is possible I use this in several of my reports.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.