Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
I'd like to see if its possible to connect to a SQL database, import data, make some changes (change the data type, merge columns, etc) and then see what the underlying SQL query is when I'm done. I understand that Advanced Editor merely shows the M code and View Native Query only shows the query up to a certain point and does not include any changes like merging columns.
Essentially I was hoping there was a way I could do data manipulation/discovery in Power BI and then grab the underlying code and then plug it into SSMS as a way to bypass writing my own code...I do not exactly have the strongest SQL skills!
Thank you!
@tylerfutures,
In Power BI Desktop, with query folding feature, you are able to view the undelying SQL query.
However, some transformations(steps) can be translated to T-SQL, but some not such as Merge Column. In this case, you will not able to view the underlying SQL query for some steps. For those transformations that don't support query folding, consider to write your own expressions.
For example, instead of using Merge Columns , you can add a custom column by writing your own expression, then you should be able to use view native query option to see underlying query. For more details, please review the following blog.
http://radacad.com/not-folding-the-black-hole-of-power-query-performance
Regards,
Lydia
Hello,
I'd like to see if its possible to connect to a SQL database, import data, make some changes (change the data type, merge columns, etc) and then see what the underlying SQL query is when I'm done. I understand that Advanced Editor merely shows the M code and View Native Query only shows the query up to a certain point and does not include any changes like merging columns.
Essentially I was hoping there was a way I could do data manipulation/discovery in Power BI and then grab the underlying code and then plug it into SSMS as a way to bypass writing my own code...I do not exactly have the strongest SQL skills!
Thank you!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 64 | |
| 31 | |
| 26 | |
| 26 |