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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Markzolotoy
Impactful Individual
Impactful Individual

Getting data from SQL Server

In my SSRS reports I am using regular SQL to get data for the report. Can I use the same SQL code to get data into a power bi report? What the online resources are to learn how to bring data into power bi reports?

 

Thanks

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Markzolotoy,

 

Power BI has so many build-in connectors to get data. So we can get data without a code most of the time.

Getting data from SQL Server 1.JPG 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We still can apply some SQL statements. But I think this isn't necessary most of the time.Getting data from SQL Server 2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We manipulate the data in the Query Editor after getting data, which uses Power Query M language. Please reference: https://msdn.microsoft.com/en-us/library/mt211003.aspx

 

Best Regards!

Dale

 

Community Support Team _ Dale
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

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Markzolotoy,

 

Power BI has so many build-in connectors to get data. So we can get data without a code most of the time.

Getting data from SQL Server 1.JPG 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We still can apply some SQL statements. But I think this isn't necessary most of the time.Getting data from SQL Server 2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We manipulate the data in the Query Editor after getting data, which uses Power Query M language. Please reference: https://msdn.microsoft.com/en-us/library/mt211003.aspx

 

Best Regards!

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CahabaData
Memorable Member
Memorable Member

Thanks for help. I have gone through the article but still dont understand how I create queries to access SQL data. When I opened Query Editor I saw expresions that are not pure T-SQL. How do learn it?

while this is a year old post - and PBI is updated monthly - and so some of the specifics may have changed but the overall idea remains the same:

 

https://www.red-gate.com/simple-talk/sql/bi/direct-query-power-bi/

 

it shows the entry of sql - - I think the gap in understanding was Direct Query being a different thing than Query Editor......

www.CahabaData.com

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.