Download .pbix file from PowerBI Service and open the report
Right click on the Query > Edit query
Your Query will be listed in the marked region of the following picture. You can remove #(lf) s and directly use - modify the query in SQL Server Management Studio.
4.) Right Click on the Applied Steps - Source. Then select Edit Settings.
5.) Your original SQL Query will be displayed in the SQL Statement region.