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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
maceyak
Regular Visitor

Modifying the Layout file that is embedded in a pbix file

I know how to disassemble a pbix file by changing the extension to .zip and then oening it.  If I then change the extension back to .pbix I can then open it in Power BI.  However, I would like to modify the Layout file that is exposed when you disassemble the pbix.  But when I do that and change the extension of the .zip to .pbix, I get a corrupted file message when I try to open in Power BI.  This happens no matter how small and inocuous the change is.  

 

Is there any way to do this without getting the corrupted file message?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I was struggling with this issue recently, and my solution is the following:

 

- Change the extension from ".pbix" to ".zip"

- Do not unzip the ".zip" file during this process

- Extract the "Layout" file from the "Report" folder in the ".zip" file

- Open the "Layout" file with Notepad++. (VERY IMPORTANT)

- Make your modifications in the Layout file

- Substitute the old "Layout" file with the new one

- Delete "SecurityBindings" file in the ".zip" file

- In the [Contents_type].xml delete the following text: 

"<Override PartName="/SecurityBindings" ContentType="" />"

- Change the extension from ".zip to ".pbix"

- The file will open without breaks

 

Hope it helps!

View solution in original post

32 REPLIES 32
Anonymous
Not applicable

I second this issue. Has anybody already opened an "idea" for this topic. Changing these parameters programmatically would be a huge enterprise BI update! Or it is quite a bummer that we can see all these parameters but not able to change it.

 

@v-yuezhe-msft in this case opening Power BI Desktop is definitely not a satisfying answer.

But which changes can we do so far, and everyone else which changes have you done in the zip? 

E.g. changing the registeredresources is possible.

Anonymous
Not applicable

I created an Idea to address this question, please vote:

Renaming dataset measures can't break client reports (change reference from name to ID)

https://ideas.powerbi.com/ideas/idea/?ideaid=649ec802-682b-ec11-b76a-281878e608e9

vinayap
New Member

Did you find solution for this issue? I too am facing the same issue while making changes to a visual through layout file.

NKP
Frequent Visitor

I have the same issue. I can open and modify the Layout file, but this corrupts the pbix file. My issue is that I used to use an arcgis esri map, but am not able to delete this custom visual via PBI Desktop (it doesn't show up in the delete visuals list). I was trying to change 

\"singleVisual\":{\"visualType\":\"esriVisual\",\"objects\":{}

to

\"singleVisual\":{\"visualType\":\"map\",\"objects\":{}

If anybody has any idea how to delete the esri visual/component, I would be grateful.

EDIT:  I have also disabled the "use esri maps" from the options, but still the esri map icon is visible in the visuals list. Is this normal? I don't want app viewers to get the  esri map notification when they open the app for the first time. 

ahmadnakib
Regular Visitor

Hi, have you found a solution for this yet?

No.

v-yuezhe-msft
Employee
Employee

@maceyak,

I would recommend you follow the instructions in the blog below to change layout.

https://powerbi.tips/2018/01/introducing-layouts/

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, Lydia.  But I am not asking about changing the visual layout of a page.  I am asking about changing a particular file named "Layout" that is exposed when you deconsturuct a PBIX file.  This file contains the formatting information for the page and the text that the designer has entered into it.  To get to this file, you do the following to a PBIX file:

 

1. Changed the extension from ".pbix' to ".zip".

2.  Open the zip file.  You will see several folders.  Go into the Report folder, and you will see the Layout file.

 

--Joey

@maceyak,

What property do you change in the Layout file? There is no official articles stating that what we can do or can't do in the Layout file.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

dia,

 

I want to change the displayNames and the textRuns.  Essentially I want to replace these by translations of the English into other languages and do this programatically.  I can do this, but then when I try to change the .zip file back to a .pbix file I can no longer open it in Power BI.  I get a message that the file is corrupted.  This happens with only the smallest change.  For example if I only change the first of the displayNames values, which is the name of the Power BI page, from "Page 1" to "Page 2".  Is there any way to make such a change without getting the corrupted file message?  If I make no change at all I can get back to the .pbix file and have it display again with no problem.

@maceyak,

I can reproduce your issue. There is no official article stating that we can change page via Layout file. I would recommend you directly open the PBIX file and change page name.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Still looking for answers on this.  Anybody?

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.