Forum Discussion

The_PBI_Chef's avatar
The_PBI_Chef
Regular Visitor
2 years ago

Power BI developer mode (.pbip) merge conflict issues

I'm trying to implement version control in PBI using .pbip files, but I have an issue. When I create 2 different branches from main, and create one DAX measure in each of these branches, I can only merge one of those branches back to main. When I try to merge the other, I get a merge conflict. It seems that model.bim gets edited on the same lines in both of these branches (doesn't matter that the measures are named differently). Does this mean that every time 2+ developers make changes on their branches from the same main branch, the only way to merge both of these branches back is to use VSCode (for example) and edit model.bim manually?

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi The_PBI_Chef ,

    When using Power BI’s developer mode with .pbip files, the model.bim file can indeed cause merge conflicts when multiple developers are making changes on their own branches. This is because the model.bim file contains the metadata for your Power BI project, including all tables, columns, measures, and relationships. When two developers add different measures on their own branches, these changes are likely to occur on the same lines in the model.bim file, leading to a merge conflict. To resolve this issue, you would indeed need to manually resolve the conflicts in a text or code editor like Visual Studio Code. This process involves comparing the changes between the two versions of the model.bim file and deciding which changes to keep.

    Power BI Desktop projects (PBIP) - Power BI | Microsoft Learn

    It’s important to note that this is a common challenge when working with version control systems and isn’t unique to Power BI. It’s always a good practice for teams to communicate well and coordinate their work to minimize the occurrence of such conflicts. Also, frequent commits and pulls from the main branch can help keep everyone’s local copies up-to-date and reduce the likelihood of conflicts.

    Best Regards

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous That's true, but you left something out. I've been working with version control in Power BI since it was introduced and released last summer. And it has one problem that should have been solved before the release, but hasn't been solved yet. If any changes were made to the pbip. file, no matter what, Power BI will randomly swap different code blocks that have nothing to do with the changes made. And this is actually a big pain in the ass, because it basically not only breaks the whole concept of version control but also leads to unjustified conflicts any time you are trying to merge changes.

      • sausaged's avatar
        sausaged
        Frequent Visitor

        Let me know if you find a solution to this problem. Right now its really stopping me from fully using versioning, because I need to do a manual copy-over merge every now and then.