Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
Currently we are migrating from Yellowfin to Power BI.The backend database is oracle
We are new to Power BI and for faster migration we need the entire Report query (Full query) in sql format to compare with the Old reports.
Pls let us know how to fetch the full report query
Solved! Go to Solution.
To fetch the full report query in SQL format from Power BI, you can follow these steps:
Open the Report in Power BI Desktop:
Use Performance Analyzer:
Copy the Query:
Convert DAX to SQL:
Using DAX Studio:
Direct Query Mode:
By following these steps, you should be able to fetch the full report query and compare it with your old reports.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
Hi @Krupar ,
Thanks saud968 for the quick reply. I have some other thoughts to add:
Here I made a test to connect to Oracle database using Direct Query in Power BI desktop. To see the query for Power BI desktop report, we can find the file named FlightRecorderCurrent.trc in the file path as below. And then use SQL server Profiler to open the file to get SQL query .
For the report in power Service, aiming to see the SQL query, we can change the setting of Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config file, Just change the EmitQueryTraces value from False to True. Please refer to the online document.Through this way we can get the SQL query like this:
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Krupar ,
Thanks saud968 for the quick reply. I have some other thoughts to add:
Here I made a test to connect to Oracle database using Direct Query in Power BI desktop. To see the query for Power BI desktop report, we can find the file named FlightRecorderCurrent.trc in the file path as below. And then use SQL server Profiler to open the file to get SQL query .
For the report in power Service, aiming to see the SQL query, we can change the setting of Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config file, Just change the EmitQueryTraces value from False to True. Please refer to the online document.Through this way we can get the SQL query like this:
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Great I was not aware of this. This is helpful thanks for adding this.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
To fetch the full report query in SQL format from Power BI, you can follow these steps:
Open the Report in Power BI Desktop:
Use Performance Analyzer:
Copy the Query:
Convert DAX to SQL:
Using DAX Studio:
Direct Query Mode:
By following these steps, you should be able to fetch the full report query and compare it with your old reports.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
Many Thanks @saud968 for the Prompt Response.
I executed the steps as per your given solution.I was able to get the DAX query and for the sql query conversion i used the DAX studio.
Below is the screeshot..Just want a confirmation whether this query will include all the filters and the formulas .Is it the correct way to check the query..Pls advice
Thanks for ur help
Yes, this should have the filters but this is Dax format. You can also work with steps shared by @Anonymous . Another option is that the SQL query generated by Power Query, go to the “Advanced Editor” in the Power Query Editor. The M code in the Advanced Editor shows the transformations applied. While this is not SQL, it gives you an idea of the data shaping steps. For a more SQL-like query, you can use the “View Native Query” option (if available) by right-clicking on the last step in the “Applied Steps” pane. This shows the SQL query sent to the Oracle database.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
@Krupar If the suggestion works then please accept it as a solution
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
74 | |
57 | |
38 | |
33 |
User | Count |
---|---|
71 | |
65 | |
58 | |
50 | |
47 |