PROPER VERSION CONTROL in Power BI using Power BI Projects and GitHub // Beginners Guide to Power BI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I want to show you how you can do proper Version Control when you're developing power bi reports we're going to go through the basics of what version controlling is what it's for how you can use this within power bi and then how you can use and leverage GitHub for Version Control all of that and more so without further Ado let's get started hi my name is fernan and welcome to the solutions abroad YouTube channel or recovery tips tricks and best practices when working with power bi upload new videos every week so make sure you hit that subscribe button and the bell icon to get notified when a new one is out so Version Control is essentially a way to track the changes that you've made to your codes when you're developing a software so think of it as basically taking snapshots of the code as you make changes during the development process and it lets developers collaborate and work on the same codes Trace any errors and revert back any changes that have been made if needed it's a common practice amongst developers especially when you're working with multiple developers in the same project and it's something that's been missing in power bi for a long time and that's and the reason for that is unlike the typical files that you'd use when you're developing codes I like developing a website or creating a script the power bi file the format of the power bi reports at the moment at least in desktop the dot pbix file is doesn't natively support text formatting so that means that when you open this in a text editor and let's say you wanted to make an update on a certain measure or add a certain visual you can't really pinpoint from the text where that change is which means that if you wanted to version power bi reports in the past you need to version the whole project file itself as opposed to just the ones that have changed in the past I covered some of the ways that you can do Version Control in power bi which is essentially just natively using the sharepoints version history which creates a snapshot of the file as you replace them but that solution was not really that robust and it's not really a proper way to Version Control your development however a new update has been released recently which allows us to convert are power bi files into sort of text formatted Json formats that we can then use and version similar to other software development projects so and what I'm talking about is this power bi project file which was released a few months ago and I want to show you how we can first enable this in power bi desktop so here we are in power bi desktop and we have one of the reports that I've built open right here the report itself is not really relevant I just want to show you how a finished report looks like and at the moment it's saved in my desktop as a DOT pbix file this is the file formats that's RBI desktop recognizes the recent change is you can now save your files into a new file format called the power bi projects and it's an option that you need to First enable in the previous settings so under file options in settings and then options if we go to preview features you need to make sure that's this option power ba project dot PBI P save option is enabled once that is enabled just make sure you restart your power bi desktop so if I hit file and save as this will let me choose power bi project files as an option to save this report as so what I'm going to do is I'm going to create a new folder here project file and I'm Gonna Save into this empty folder that I've just created and I hit save as you can see what it's done is it's created as four different files within this folder so this is power bi projects essentially so it has so there are a few different things here to understand so first is this power bi project file which is now what you will use to open the report and make changes from now on the contents of this report is now not tied to this one file D dot pbix file but it's split into these two folders so the data sets and the reports so whenever you publish reports in the service you know that it publishes two files the data sets and the reports but this kind of uh this is abstracted free so you don't really see this at least on the dot PBX file but what's most interesting about this change is that if I click on the data set for example all of the definitions that you have is something that you can open in a text file so the Bim file for example is the main file where all of your measures and calculations are still stored for your model we can't open it natively here so we're gonna open it in notepad and notepad plus plus and this lets you view all of the different measures and calculations that we've set up that I've set up in the model so and it's in this formats this Json formats which is something that is readable and that you can kind of modify by yourself if you wanted to I know that there is a way for you to just update this here and your power B report to updates but we're not going to go through too much about that for now just for you to understand that instead of now having all of our files our power bi project into this one pyx file it's now split into this text formatted files which we can then use for Version Control so let's go back to the project file and let's open this new file type that we have the power bi dot pbip project file so as you can see or at the very least from my perspective everything looks exactly the same as you would open a power bi pbix file you can update your pages you can create new measures the only difference is that as you make them instead of it being saved on this one file pbix it gets your changes gets saved in one of these folders depending on what the changes that you've made so if you've added a new measure it will get added to the Bim file in the data sets and if you make changes to the report itself this folder and all of these files will get updated so that's the distinction that at least we have at the moment there are a few limitations at least at the moment with the PBI P files the first thing that you probably notice is that the sensitivity label is is not available thing that you'll need is something called the GitHub desktop this is a free software that you can install on your desktop and it lets you connect to the directories of the files that you have within your within your local machine it will let you track changes that you make and then finally be able to do those commits to create those snapshots for your reports and projects as you make this is also also what you will use to publish any of the changes that you've made into GitHub so the the web version of it so that your users your other developers can collaborate on it too I'm using GitHub desktop at the moment just because this is the only one that I found the easiest but you can use any other tool that is available for you that can do Version Control so it might be so that might be Visual Studio which I know it natively allows or you can use the git bash which is the terminal based git tool that lets you control your version history but instead of having a UI it will be on a kind of terminal so before we start with this Version Control demo I just want to be clear that I'm not an expert at doing this version history I only know the sort of the basic gist of it so what I'm going to do is I'm going to cover the three things that I would want to do at a minimum for this versioning to be effective we want to be able to create the repository we want to be able to commit and publish all of the changes into our repository and then finally give us the ability to revert any of the changes that we've made to previous versions so these three would be the key things that will benefit us when we are developing RBA reports so from GitHub desktop what you'll need to do is to add an existing repository because we've already got the repository here we'll just say I want the project file folder and then here it says the directory does not appear to be a git repository would you like to create a repository instead so we'll just hit create and then we'll just say iPhone reduce tests and then we'll leave everything empty for now we'll just hit create repo and and here is what is done so this is GitHub desktop essentially you have one branch which is the main branch where all of the changes are being made then you can have multiple projects because you can have multiple projects we have two tabs here the changes which tracks any of the changes that will or have been made in that repository that we have just created and then the history is basically all of the snapshots that you've created of your codes and what has changed in that snapshot so at the moment we've only created one snapshot which is the initial commit which is essentially just adding all of these files that we have into the repository so that's what it means here the pluses so these are all the files that we've added into this repo so what we're going to do from here is we're gonna start by publishing this first on to GitHub we're just gonna name this one iPhone reviews our bi and then we'll keep it private just because we're testing it so we'll hit publish repository you'll see it starts to push this onto the web so now it's finished so what we're going to do is Click view on GitHub which will open up that repository that we've created so congratulations you've done your first version control in GitHub so now that we have the version control setup we've done our first commits let's see what happens when we start developing our reports in this power bi project file and how you can start versioning this in GitHub so I'm going to minimize this for now and here we are back in my power ba projects file I'm gonna start by let's just say for example I want to add a new measure here that might be useful I'm going to create a measure called S2 and I'm just gonna type something this is a test measure these digits so now that we've made that we're gonna hit file and save and now let's see what it will show us here in GitHub desktop so as you can see it's detected that something has changed so and what it's done is it looked for I'm just expanding it where that change has happened so it's noticed that the changes happened on the Bim file which is where I was talking about earlier about the data set and it shows us exactly where that change has happened so it looks like we've added a new measure which wasn't there before and that's what it's highlighting here in green so there are two boxes the before on the left hand side and in the after so where that got pushed into so that is sort of what version control sort of allows us to do it lets us track those individual changes within our either model or within our report so let's say we're happy with this change that we've made we have a snapshot of the report when we first initially committed it which means that we can go back to it later but we want to use use this version moving forward with the changes that we've made this is a good point in your software development to start a version controlling to create a new version a new snapshot of your codes pertaining to the changes that you've made so that's what the option on the bottom left does for you so what it will allow you to do is it will let you add a title to this version that you want to create and add an even more verbose description so that when your other developers look at what's changed they can refer to your comments so that they would know what has changed in that code base that you've done so let's say added a new test measure and then a measure to check Version Control so I'm just going to add some description there just as an example and then we're going to hit commit from here commits to main so now that change has been committed we're gonna push this to origin which is just updating the version that we have in GitHub so now if we go to view on GitHub again you will see that that change that we've made is showing up now here in this folder because this is where we have updated so this is the title of the change that we've created and these are from the initial command so these haven't changed since we did the first initial commit let's do a few more things just to show you the kind of power of version controlling and when it would be useful apart from obviously creating snapshots so let's say we don't let's say we've accidentally deleted one of our files here so let's delete this pbip file in our GitHub desktop it shows red which means that this file has been deleted let's Commit This deleted pbip file and here commit to Main let's push it to origin which updates GitHub now if we open a GitHub online you will see that in this folder it's in this repository at the very least it's gone in our local file this pbip file is also gone but let's say this file is gone but we changed our mind we actually found out that this file is super useful because this is how we'll be able to update our data sets and Report files within this project file folder how do you then revert those changes that you've made to delete this file so it turns out you can do it very simply in GitHub desktop so from GitHub desktop you just need to go to history here this history Tab and this step where we've deleted the project file you can right click on it and hit revert changes in commit so what it will do is it will create a new version where it restored that file that you've deleted into your local folder so if we open the local folder now the power ba project file is back there and to restore it in the GitHub web all we need to do is just make sure that we push that new commit to restore that file there so now if we go back to to that you'll see that we have now reverted that file and that's really it for this video hope you now know how easy it is to start doing version controls for your power bi reports and make your development lives a little bit easier if you want to learn more about version controls and sort of limitations that the power ba projects file feature has I'll leave a link to the blog posts in the description box below thanks for watching as usual give this video a like if you found it useful give it a dislike if you didn't something to do better for next time ask your questions in the comment section box below so I can help you and you can help others if you really liked this video we have a patreon page where you can support the channel and get exclusive perks like Early Access demo files and credits at the end of these videos thanks again for watching and see you in the next one
Info
Channel: Solutions Abroad
Views: 10,229
Rating: undefined out of 5
Keywords: solutions abroad, power bi, powerbi, power bi tutorials, power bi for beginners, beginners guide to power bi, data analytics, dax, data modelling, data visualisation, business intelligence, how to power bi, power bi how to, power bi best practices, power bi tips and tricks, power bi standards, power bi patterns, power bi help, power bi tips, power bi 2023, power bi version control, power bi git, github, power bi github, power bi version, power bi versioning, power bi commit
Id: PDI3k4G4Dpk
Channel Id: undefined
Length: 16min 9sec (969 seconds)
Published: Wed Aug 09 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.