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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.