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

Join 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.

Reply
franco_mango
New Member

Get sql query from powerbi report/dataset

Can I get SQL query used to create a dataset in PowerBI using the powerbi report/dataset. I no longer have the desktop file (.pbix).

I only have the report and dataset in PowerBI Service. I had used couple of joins and a couple of where conditions in powerBI desktop. I am trying to recreate the dataset but now I somehow get slightly different version of the dataset.

 

Can I find the joined tables and where conditions used in the powerBI desktop via the report in powerBI service?

Thank you!

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. Just in case remember you can download the pbix file from Service. If you can't find the option, ask your admin to turn that on for you for just an hour to help you with the development.

The only way to read the whole power query code from a dataset at service is if it's hosted on dedicated capacity. Only premium, embedded and PPU workspaces will let you connect with XMLA endpoint to the dataset to read how it's built. If you have one of those licenses then open download and open Tabular Editor. Connect to the workspace, select the dataset and open it. The table contains partitions that will show the whole code like Advanced Editor reading all Power Query.

I hope that helps


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi. Just in case remember you can download the pbix file from Service. If you can't find the option, ask your admin to turn that on for you for just an hour to help you with the development.

The only way to read the whole power query code from a dataset at service is if it's hosted on dedicated capacity. Only premium, embedded and PPU workspaces will let you connect with XMLA endpoint to the dataset to read how it's built. If you have one of those licenses then open download and open Tabular Editor. Connect to the workspace, select the dataset and open it. The table contains partitions that will show the whole code like Advanced Editor reading all Power Query.

I hope that helps


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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