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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shashi432
New Member

How to gete power bi report sql (oracle database) query.

Can anyone please let me know, how to get the power bi report query.

for e.g  I have created one report on power bi desktop  I wanted to see the corresponding sql  generated by this report.

 

already tried this link:

https://community.powerbi.com/t5/Desktop/How-to-get-SQL-query-for-report/m-p/459830#M213273

but above link for sql server I'm using oracle database in backend and connected it with odbc driver.

FlightRecorderCurrent.trc is not working in above case. so can anyone tell any simple way to get the sql query after creat

 

1 ACCEPTED SOLUTION

Thanks Martyn,

 

 I am not using direct query mode, I'm using import query mode.

Thanks for the link , yes I wanted to check my pbi report query performance; so as you have given me some guide link.

 

 I'll go through and let you know for any other issue. 🙂

 

 

View solution in original post

4 REPLIES 4
MartynRamsden
Solution Sage
Solution Sage

Hi @shashi432 

 

Open the Power Query Editor then for each query, right click on the last applied step in the list:

Capture.JPG

 

If the 'View Native Query' option is greyed out, right click on the steps above until it's visible.

This will show you the SQL sent to the underlying data source.

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.

 

Hi Martyn,

Thanks for your response, but this is the not giving the correct output. for e.g

i have created following report on report section

Capture.PNG

and when you go to the query editor and will try to see the native query that will show you the table you imported from database.

 

But my requirement is ; I would like to see the report/dashboard which I have created, query of that report/dashboard.

 

native query is giving  the query which you have imported or modified on query editor.

 

 

 
 

Hi @shashi432 

 

If you're using Direct Query mode, you could capture the SQL queries being passed from Power BI to your Oracle database using your DBMS (e.g. Toad for Oracle).

 

However, if you're using import mode, there are no SQL queries generated once your data has been loaded; all queries passed to the Vertipaq engine are DAX.

If you want to capture the DAX queries generated as you interact with your report, you can use the 'Performance analyzer' within Power BI. This is a good guide: www.sqlbi.com/articles/introducing-the-power-bi-performance-analyzer/ 

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.

 

 

 

Thanks Martyn,

 

 I am not using direct query mode, I'm using import query mode.

Thanks for the link , yes I wanted to check my pbi report query performance; so as you have given me some guide link.

 

 I'll go through and let you know for any other issue. 🙂

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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