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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AnandNamburi
Helper III
Helper III

How to view the SQL generated by a power bi report

Hi All,

 

I have build a report in Power BI desktop.

If I want to know/see the backend SQL generated by the report how can I acheive it.

 

Thanks,

Anand

1 ACCEPTED SOLUTION
goncalogeraldes
Super User
Super User

Hello there @AnandNamburi ! You can use the "View Native Query" option in Power QUery if query folding is possible on your queries generated in Power Query. 

 

goncalogeraldes_0-1657099585726.png

 

You can refer to the following documentation as support to your question:

https://blog.pragmaticworks.com/power-bi-checking-query-folding-with-view-native-query

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

 

View solution in original post

2 REPLIES 2
arichard19
Resolver I
Resolver I

You could use the SQL Profiler - https://docs.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler?view=sql-server-v...

 

Or possible DAX studio for you DAX measures - https://www.sqlbi.com/articles/analyze-directquery-requests-using-dax-studio/

 

If you are running a NATIVE query in Power Query you can right click on any step in your Power Query Windows and select "View Data Source Query"

arichard19_0-1657099883255.png


Which will return the SQL code to you

arichard19_2-1657099997744.png

 

goncalogeraldes
Super User
Super User

Hello there @AnandNamburi ! You can use the "View Native Query" option in Power QUery if query folding is possible on your queries generated in Power Query. 

 

goncalogeraldes_0-1657099585726.png

 

You can refer to the following documentation as support to your question:

https://blog.pragmaticworks.com/power-bi-checking-query-folding-with-view-native-query

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors