How to update or create a measure to Power BI Premium Per user without having to publish entire dataset
Following on from my previous blog post How to complete granular deployment of Power BI Desktop changes to the Power BI Service (Using PPU), I want to also show how to update or create a measure in my dataset, where I can deploy this via ALM Toolkit.
This now saves me from doing the following tasks previously:
- Time taken to refresh the PBIX file so that the data is up to date.
- Re-uploading my PBIX.
- If configured re-creating the incremental refreshing
- Time and effort to upload and wait for dataset refresh.
- Quick updates to my dataset.
I will not have to worry about saving my PBIX file, file and if configured re-creating the incremental refreshing. This saves me a lot of time and effort.
NOTE: When deploying a measure there is no need to re-process anything because the measures are calculated on the fly
Updating my existing measure
In this example I have an existing measure which is incorrect, and I need to update it.
-
This is what my current measure looks like using Tabular Editor.
-
It is incorrect, and I now change it to the following:
-
I then saved my PBIX File.
Using the ALM Toolkit to compare and deploy the granular changes to my PPU Dataset
I am now at the point where I can now deploy only the changes, I want to deploy using the ALM Toolkit.
NOTE: You can download the ALM Toolkit here: ALM Toolkit
Deploying the changes
- I had already installed the ALM Toolkit.
-
In Power BI Desktop I went to External Tools and selected ALM Toolkit
-
I am then presented on what I want to compare.
- In my example I am comparing my PBIX file to my dataset in the PPU App Workspace as shown below.
- NOTE: When I click on the Dataset it then prompts me to log in and authenticate.
- I then clicked Ok, and the comparison began.
-
By default, after the comparison is complete it will show all actions.
- ACTIONS options are Update to Update, or Skip to skip the action.
-
What I typically do is to click on the drop down under Select Actions and select “Hide Skip Objects”, this makes it easier for me to see what update actions there are.
-
Now, I can see that my Order table is left, and it has got the action set to Update, I can see that the measure needs to be updated.
-
What I can now also do, is if I look at the bottom of the screen there is a comparison to show me where the changes are.
-
Next, I clicked on Validate Selection, this is where it validates everything to make sure it can be deployed.
-
Based on the options I have selected to show me warnings and informational messages, which is displayed as shown below.
-
The option to Update is now available.
- I do have other things I could such as Generate script or Report differences, but I will leave that to another blog post.
-
I click on Update, and then get a prompt asking me if I am sure I want to update the target.
- Of course, I want to! And I click Yes.
-
Once the deployment is complete, I can then see it was successfully deployed.
-
I was then prompted if I want to refresh the comparison.
- I clicked on No because I know what has been deployed.
-
I then checked in the Power BI Service and went to see if the measure has been updated to the higher Sales
Creating and deploying a New Measure
The steps are quite similar to create and deploy a new measure. Below I will create a new measure called [Quantity]
-
This is what my new measure looks like using Tabular Editor.
-
I then saved my PBIX File.
Using the ALM Toolkit to compare and deploy the new measure to my PPU Dataset
I am now at the point where I can now deploy only the new measure, I want to deploy using the ALM Toolkit.
Deploying the new measure
- I had already installed the ALM Toolkit.
-
In Power BI Desktop I went to External Tools and selected ALM Toolkit
-
I am then presented on what I want to compare.
- In my example I am comparing my PBIX file to my dataset in the PPU App Workspace as shown below.
- Because I had done this earlier there was no need for me to authenticate again.
- I then clicked Ok, and the comparison began.
-
By default, after the comparison is complete it will show all actions.
- ACTIONS options are Update to Update, or Skip to skip the action.
-
What I typically do is to click on the drop down under Select Actions and select “Hide Skip Objects”, this makes it easier for me to see what update actions there are.
-
Now, I can see that my Order and this time the action is set to Create
- There is no need to look at the code change because this is a new measure that is being created.
-
Next, I clicked on Validate Selection, this is where it validates everything to make sure it can be deployed.
-
Based on the options I have selected to show me warnings and informational messages, which is displayed as shown below.
-
The option to Update is now available.
- I do have other things I could such as Generate script or Report differences, but I will leave that to another blog post.
-
I click on Update, and then get a prompt asking me if I am sure I want to update the target.
- Of course, I want to! And I click Yes.
-
Once the deployment is complete, I can then see it was successfully deployed.
-
I was then prompted if I want to refresh the comparison.
- I clicked on No because I know what has been deployed.
-
I could then open my PBIX report (Which is separated from the dataset) and create a report and upload this to the Power BI Service.
- What I did instead is to go into the Power BI Service and see if I can see my new measure [Quantity], which I can see as shown below.
-
NOTE: I did not initially see the new measure and in the Power BI Service I had to click on the Refresh button to refresh the metadata
- Finally, I could then create a visual with my new measure as shown below.
Summary
In this blog post I have demonstrated how to update or create a new measure and just deploy the changes to the Power BI Service.
I hope that you found this useful, and it shows how powerful and easy it is to use the PPU or Premium for deployment of changes.
Thanks for reading and have an awesome day
[…] Gilbert Quevauvilliers follows up: […]
Hey Gilbert! Great article! Thanks for that. Do you know if ALM toolkit can be used between two desktop files to control or merge changes to handle things like versioning? I know that two years ago the changes didn’t apply from one to another but that might have changed.
Hi there,
I have tested it out and far as I know it should work as long as you only modify what is currently supported.
Very Useful functionality
Thank you for the kind comment!