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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EaglesTony
Helper V
Helper V

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.

View solution in original post

3 REPLIES 3
EaglesTony
Helper V
Helper V

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.

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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