How to Use Visual Studio Code to Compare and Merge Changes in Power BI Files (2024)

Manage version control and simplify the user experience with Visual Studio Code in Power BI.

Visual Studio Code (VS Code), Microsoft’s lightweight but powerful source code editor, is a versatile tool for a wide range of development tasks. Using Visual Studio Code for comparing and merging changes in Power BI files is a powerful way to manage version control, particularly when working in teams. Given the iterative nature of data modeling and report design in Power BI, this capability can streamline collaboration and version control, particularly in teams. Explained below are the steps for using VS Code to compare and merge changes in Power BI files.

*** Before getting started, remember to backup your original Power BI files before attempting these procedures to prevent inadvertent data loss.

Step 1: Convert Power BI Files to JSON Format

Power BI files (.pbix) are essentially compressed archives, making direct comparison difficult. However, a tool called “Power BI Sidetools” can help convert these files into JSON format, enabling easy comparisons.

To install PBI Sidetools:

  1. Download the installer from the PBITools GitHub page (Welcome to pbi-tools | pbi-tools).

a. Current latest software is here: Release 1.0.0-rc.4 (TMDL Preview-2) · pbi-tools/pbi-tools (github.com)

b. Download these: pbi-tools.1.0.0-rc.4.zip, pbi-tools.core.1.0.0-rc.4_win-x64.zip

2. Decompress the folders and save them in another folder called Util (this is for the PowerShell scripts to work).

3. Create a PowerShell file with the following PowerShell scripts updated to match your folder structure.

How to Use Visual Studio Code to Compare and Merge Changes in Power BI Files (1)

I recommend using GitHub or some other repository to modify your code. You will want to update the name of the file and the folder path to what is on your device. Once the code above has ran, you will have a new folder that contains the JSON files that make up a .pbix file.

Run this PowerShell script for both files you want to compare.

Step 2: Comparing Files with VS Code

With the Power BI files now in JSON format, you can use VS Code to compare them.

  1. Open VS Code and navigate to the Explorer view (Ctrl + Shift + E).
  2. Open the folder where you decompressed the Power BI files.
  3. Right-click on the first file and select ‘Select for Compare.’
  4. Right-click on the second file and select ‘Compare with Selected.’

VS Code will display the two files side by side, highlighting the differences between them. This allows you to visually compare and analyze changes or discrepancies.

Step 3: Merge the Changes

After comparing the files, you might want to merge changes from one file to another. VS Code has in-built features that support this.

  1. Open the comparison view as described in the previous step.
  2. Look for the inline “change navigation” icons above and below the scrollbar.
  3. Click on these icons to move between changes.
  4. Use the “Accept Change” button (which appears when hovering over a change) to accept changes from the source (left) file to the destination (right) file.

Step 4: Convert JSON Files Back to Power BI Files

After merging changes, you’ll want to convert the JSON files back to the .pbix format. PBI Sidetools can help with this.

  1. Create a PowerShell file with the code below.
  2. Update the file paths to match your device/repository.
  3. If your Power BI file has a dataset you will need to create a .pbit file and then you can open and save it as a .pbix file
How to Use Visual Studio Code to Compare and Merge Changes in Power BI Files (2)

This will create a new Power BI file incorporating the merged changes.

Ready to Get Started?

Using the Visual Studio method brings added control, transparency, and flexibility for working on complex or collaborative projects in Power BI. For help unlocking these benefits, contact a Power BI specialist today.

How to Use Visual Studio Code to Compare and Merge Changes in Power BI Files (2024)
Top Articles
404 Error Page
Debt Consolidation Loans To Consolidate Debt. StepChange
$4,500,000 - 645 Matanzas CT, Fort Myers Beach, FL, 33931, William Raveis Real Estate, Mortgage, and Insurance
AMC Theatre - Rent A Private Theatre (Up to 20 Guests) From $99+ (Select Theaters)
Canya 7 Drawer Dresser
Thor Majestic 23A Floor Plan
Le Blanc Los Cabos - Los Cabos – Le Blanc Spa Resort Adults-Only All Inclusive
Asian Feels Login
Nikki Catsouras Head Cut In Half
Xrarse
Optum Medicare Support
What's New on Hulu in October 2023
Bustle Daily Horoscope
Nieuwe en jong gebruikte campers
True Statement About A Crown Dependency Crossword
Zendaya Boob Job
ᐅ Bosch Aero Twin A 863 S Scheibenwischer
Gemita Alvarez Desnuda
Sadie Proposal Ideas
Amih Stocktwits
Ubg98.Github.io Unblocked
Loft Stores Near Me
1989 Chevy Caprice For Sale Craigslist
Busted Newspaper Fauquier County Va
Selfservice Bright Lending
Mail.zsthost Change Password
Okc Body Rub
Обзор Joxi: Что это такое? Отзывы, аналоги, сайт и инструкции | APS
Hellraiser 3 Parents Guide
Acurafinancialservices Com Home Page
SOGo Groupware - Rechenzentrum Universität Osnabrück
The value of R in SI units is _____?
Mumu Player Pokemon Go
Darrell Waltrip Off Road Center
Consume Oakbrook Terrace Menu
Hermann Memorial Urgent Care Near Me
Staar English 1 April 2022 Answer Key
Pitchfork's Top 200 of the 2010s: 50-1 (clips)
Skyrim:Elder Knowledge - The Unofficial Elder Scrolls Pages (UESP)
Froedtert Billing Phone Number
11301 Lakeline Blvd Parkline Plaza Ctr Ste 150
2 Pm Cdt
Nina Flowers
Despacito Justin Bieber Lyrics
Southwest Airlines Departures Atlanta
Suntory Yamazaki 18 Jahre | Whisky.de » Zum Online-Shop
Craigslist Mendocino
9294027542
Helpers Needed At Once Bug Fables
Diesel Technician/Mechanic III - Entry Level - transportation - job employment - craigslist
Ff14 Palebloom Kudzu Cloth
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6761

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.