Forum Discussion
Power BI downloaded PBIX does not contain Power Query queries
Hi everyone,
I am having a very confusing issue with a Power BI report and I would appreciate some guidance.
Background
I inherited a Power BI report created by another developer.
The report is published in Power BI Service and uses several Azure Functions as data sources (REST APIs returning JSON).
Current sources include endpoints like:
- /api/get_jira_epics
- /api/get_jira_tasks
- /api/get_jira_sprints
The report itself works correctly in Power BI Service.
Problem 1 – Downloaded PBIX has no queries
When I download the report from Power BI Service as:
“A copy of your report and data (.pbix)”
and open it in Power BI Desktop:
- the report visuals appear correctly
- the dataset exists
- BUT when I go to:
Transform DataNo queries are visible at all.
So I cannot see or edit the original queries created by the previous developer.
This makes me think the report may be:
- connected to a semantic model
- or partially live-connected
but I am not fully sure.
Problem 2 – Adding a new Azure Function breaks the report
I created a new Azure Function endpoint:
/api/get_pmo_weeklyWhen I add it in Power BI Desktop using:
Get Data → WebHowever, after:
Close & ApplyAll visuals start showing errors such as:
There was a problem with one or more fields
The column 'CW_Tasks_Expanded[Week Start]' either doesn't exist
Error fetching data for this visual- existing tables disappear
- relationships break
- measures become invalid
- old visuals lose references
even though I only added one new Web source.
Additional context
The report uses:
- Azure Functions (REST APIs)
- MySQL Azure database
- multiple DAX measures
- custom visuals
- slicers based on week ranges
My goal was simply:
- add a new table (PMO_Weekly)
- keep all existing tables intact
- create new visuals/measures using the new weekly data
But adding the new source seems to destabilize the whole model.
Questions
- Why are the original Power Query queries not visible in the downloaded PBIX?
- Is this behavior expected for reports connected to semantic models/thin reports?
- Why would adding a single new Web source cause existing tables/measures/visuals to disappear or fail?
- What is the correct approach to extend this kind of report architecture?
Any help would be greatly appreciated.
Hey, I'll try to do a quick diagnosis on your situation:
Your PBIX is a thin report connected live to a published semantic model. The tables, M code, and measures all live in the dataset artifact in the workspace, not in the PBIX you downloaded. That's why Power Query is empty. Totally expected behaviour.
The reason adding a Web source nukes everything: Power BI Desktop silently converts your live connection into a composite model (DirectQuery for Power BI semantic models). Once that happens, the original tables become "remote" proxies, field bindings shift, and visuals/measures start failing with stuff like "column doesn't exist". You didn't break it by adding one table, the model architecture got swapped underneath you.
What to do instead:
- Toss the broken PBIX, redownload a clean copy.
- Find the original authoring PBIX (the one that built the dataset) from the previous dev or source control. Add your get_pmo_weekly query there, republish, and your thin report picks it up automatically.
- If you can't find the authoring PBIX, connect to the dataset via the XMLA endpoint using Tabular Editor. You can add the M-based table, relationships, and measures directly to the published model.
- Only go composite on purpose, when the new data genuinely shouldn't live in the central model. Don't do it just to add a table.
Confirm the live connection by checking the bottom-right status bar in Desktop, should say "Connected live to..."
If this helped, a thumbs up and accepting the solution would be appreciated.
Best,
Shai KarmaniHi aliciaortega93 ,
This appears to be expected behavior because the downloaded PBIX is most likely a thin report connected to a centralized semantic model (dataset) rather than containing the original Power Query logic.
In this architecture:-
Azure Functions / SQL / APIs
↓
Central Semantic Model / Dataset
↓
Thin ReportsThe actual Power Query transformations, relationships, and source connections exist in the upstream semantic model, not in the downloaded PBIX.
That explains because
- visuals still work
- fields are visible
- but Power Query is empty
The downloaded PBIX contains mainly:
- report pages
- visuals
- slicers
- formatting
- some measures
but not the original ETL/model layer.
For the second problem the issue most likely happened because the original report was connected to a central Power BI dataset (thin report). When a new Web/API source was added locally in Power BI Desktop, the report structure changed internally to support both the existing remote dataset and the new local table together.
As a result, Power BI had to rebuild parts of the model, which likely caused existing relationships, field references, and visuals to break unexpectedly.
Originally the report was:
- live connected to a semantic model
After adding a local table, Power BI had to create a local model layer, combining:
- remote semantic model tables
- local imported tables
This changes the architecture into a composite model and can cause:
- metadata lineage changes
- relationship instability
- storage mode conflicts
- broken DAX references
- invalid visual bindings
So even though only one table was added, Power BI internally rebuilt parts of the model, causing existing visuals and measures to fail.
The recommended approach is NOT to extend the thin report directly but you can-
- Modify the upstream semantic model or original dataset PBIX
- Add the new Azure Function there
- Create relationships in the central model
- Republish the semantic model
- Let the thin report consume the updated dataset
OR you can -
- Add the source through Dataflows- (Create: a Dataflow Gen2
ingest /api/get_pmo_weekly
expose it to semantic modelThen update the central dataset
expose it to semantic model) - Build a separate PBIX if upstream access is unavailable- (Create a new PBIX, import required tables, add your new API, rebuild only needed visuals)
Recommended recovery step-
- Re-download a clean PBIX
- Avoid adding local sources directly into the thin report
- Identify the original semantic model/dataset
- Implement the new API upstream instead of inside the downloaded report.
Hope this works for you!
4 Replies
- Shai_Karmani
Super User
Hey, I'll try to do a quick diagnosis on your situation:
Your PBIX is a thin report connected live to a published semantic model. The tables, M code, and measures all live in the dataset artifact in the workspace, not in the PBIX you downloaded. That's why Power Query is empty. Totally expected behaviour.
The reason adding a Web source nukes everything: Power BI Desktop silently converts your live connection into a composite model (DirectQuery for Power BI semantic models). Once that happens, the original tables become "remote" proxies, field bindings shift, and visuals/measures start failing with stuff like "column doesn't exist". You didn't break it by adding one table, the model architecture got swapped underneath you.
What to do instead:
- Toss the broken PBIX, redownload a clean copy.
- Find the original authoring PBIX (the one that built the dataset) from the previous dev or source control. Add your get_pmo_weekly query there, republish, and your thin report picks it up automatically.
- If you can't find the authoring PBIX, connect to the dataset via the XMLA endpoint using Tabular Editor. You can add the M-based table, relationships, and measures directly to the published model.
- Only go composite on purpose, when the new data genuinely shouldn't live in the central model. Don't do it just to add a table.
Confirm the live connection by checking the bottom-right status bar in Desktop, should say "Connected live to..."
If this helped, a thumbs up and accepting the solution would be appreciated.
Best,
Shai Karmani - trivedisunita
Continued Contributor
Hi aliciaortega93 ,
This appears to be expected behavior because the downloaded PBIX is most likely a thin report connected to a centralized semantic model (dataset) rather than containing the original Power Query logic.
In this architecture:-
Azure Functions / SQL / APIs
↓
Central Semantic Model / Dataset
↓
Thin ReportsThe actual Power Query transformations, relationships, and source connections exist in the upstream semantic model, not in the downloaded PBIX.
That explains because
- visuals still work
- fields are visible
- but Power Query is empty
The downloaded PBIX contains mainly:
- report pages
- visuals
- slicers
- formatting
- some measures
but not the original ETL/model layer.
For the second problem the issue most likely happened because the original report was connected to a central Power BI dataset (thin report). When a new Web/API source was added locally in Power BI Desktop, the report structure changed internally to support both the existing remote dataset and the new local table together.
As a result, Power BI had to rebuild parts of the model, which likely caused existing relationships, field references, and visuals to break unexpectedly.
Originally the report was:
- live connected to a semantic model
After adding a local table, Power BI had to create a local model layer, combining:
- remote semantic model tables
- local imported tables
This changes the architecture into a composite model and can cause:
- metadata lineage changes
- relationship instability
- storage mode conflicts
- broken DAX references
- invalid visual bindings
So even though only one table was added, Power BI internally rebuilt parts of the model, causing existing visuals and measures to fail.
The recommended approach is NOT to extend the thin report directly but you can-
- Modify the upstream semantic model or original dataset PBIX
- Add the new Azure Function there
- Create relationships in the central model
- Republish the semantic model
- Let the thin report consume the updated dataset
OR you can -
- Add the source through Dataflows- (Create: a Dataflow Gen2
ingest /api/get_pmo_weekly
expose it to semantic modelThen update the central dataset
expose it to semantic model) - Build a separate PBIX if upstream access is unavailable- (Create a new PBIX, import required tables, add your new API, rebuild only needed visuals)
Recommended recovery step-
- Re-download a clean PBIX
- Avoid adding local sources directly into the thin report
- Identify the original semantic model/dataset
- Implement the new API upstream instead of inside the downloaded report.
Hope this works for you!
- AnonymousNot applicable
Thank you for reaching out to the Microsoft Fabric Forum Community.
Shai_Karmani trivedisunita Thanks for the inputs.
I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.
- AnonymousNot applicable
Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.