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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
RobertXiong
Helper II
Helper II

how to SQL Statement to create report in Power BI desktop

Hi 

 

I installed Power BI Desktop on my computer, created data connection to database, got dataset in Power BI Desktop. right now I am going to create report base on those tables in the dataset. I already had exist SQL Statement for the report. how can I use the exist SQL Statement to build report ? instead of selecting columns from tables, and building filters etc.

 

Thanks advanced

 

Robert

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@RobertXiong , You have to create a connection and in advance option, you can give SQL

AdvanceProperty.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

@RobertXiong 
Unfortunately, Power Bi doesn't support using SQL statement to build report, you can only use it to connect database to Power BI.

V-pazhen-msft_0-1616034885041.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@RobertXiong 
Unfortunately, Power Bi doesn't support using SQL statement to build report, you can only use it to connect database to Power BI.

V-pazhen-msft_0-1616034885041.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Thanks so much, Paul Zheng

amitchandak
Super User
Super User

@RobertXiong , You have to create a connection and in advance option, you can give SQL

AdvanceProperty.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your solution. I already created connection to database and already created dataset in Power BI Desktop, it's all ready for building report. I already has SQL Statement like "Select employee_id, employee_name, dept_name, salary from employee, department where .....", actual SQL Statement is much more complicated than this example, that's why I prefer to use this SQL Statement to build report. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.