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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
EaglesTony
Post Prodigy
Post Prodigy

Is there a preference between writing a sqlquery directly in PowerBI or executing a stored procedure

Hi,

 

  PowerBI Desktop allows a connection to SQLServer and to either write the SQL directly within PowerBI or executing a stored procedure within PowerBI.

 

  Is there any preference of when to use either ? (i.e. performance, parms, etc) 

1 ACCEPTED SOLUTION

Hi, I understand what you mean.
There is no difference in performance.
When it comes to checking whether queries are correct, there is a difference.
When you write through POWER BI, you will notice some nuances in writing way like some issues with upper case / lower case.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
EaglesTony
Post Prodigy
Post Prodigy

What I meant was in PowerBI to get a connection to SQLServer to pull records, you can either write the SQL statements within PowerBI or wining PowerBI execute a stored procedure. I wasn't sure if there is an advantage to either method, as the most important thing would be performance.

Hi, I understand what you mean.
There is no difference in performance.
When it comes to checking whether queries are correct, there is a difference.
When you write through POWER BI, you will notice some nuances in writing way like some issues with upper case / lower case.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Using SQL is the best way to write SQL 🙂
There have been times when an editor at PBI missed errors.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.