Reply
EaglesTony
Post Prodigy
Post Prodigy
Partially syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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.

Syndicated - Outbound

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

Syndicated - Outbound

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

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)