Combining the power of Azure scalability with the ease-of-use of Microsoft Flow, to start your Azure Power BI Embedded Capacity when you need it. Let’s do what we like most: automate stuff!
Picture yourself test-driving Power BI Premium functionality by leveraging Azure Power BI Embedded Capacity. A great way to have the Premium capabilities available, without the upfront costs and the long-term commitment (Christopher Finlan explains it in his blog post, and Chris Webb shared a blog post on it earlier).
Then you probably don’t want that capacity node to be running all month long, right? That would cost about €5.000! Around the same monthly costs as a Power BI Premium P1 node, what a ‘coincidence’ .
The autoscale-solution
To prevent the capacity node from running 24/7, the first option that I thought of was to create a scheduled autoscale runbook in Azure Automation. Depending on your schedule this potentially can be a very cost-effective solution! If you, for instance, create a schedule that resumes the capacity on workdays at 8:00 and pauses it at 19:00, the monthly cost of the A4 SKU would be around €1.500 (shared estimate in the Azure Calculator). That’s about €3.500 in savings you can spend on other Azure resources (how about creating two more capacity nodes ).
I’ve shared the autoscale script on GitHub. If you want to learn how to create a runbook in Azure Automation to schedule this script, follow the steps provided by Jorg Klein in this blog post where he does a similar thing for Azure SQL Database. It’s no coincidence my ower BI Embedded Capacity autoscale-script looks very similar to the script on that blog post. Jorg and I created that script together and it was the inspiration for the Power BI Embedded Capacity autoscale-script.
The scale-on-demand-solution
But, as I said, I’ve got a nice little trick that in certain scenarios will be even better. It will allow you to kick-off your Azure Power BI Embedded Capacity on-demand, whenever you need it! (Without the need to go to the Azure Portal, find the resource and click on ‘Start’). By default, the capacity will be in a paused/suspended state and we only turn it on when we need it.
This can be especially useful in scenarios where you are not the only user of the Embedded capacity, and other Power BI users in your organization also want to be able to start the capacity, on-demand (without asking you each time to start it for them ). The solution here is to create a runbook in Azure Automation that simply starts your Embedded capacity, and trigger that runbook using a Button in Microsoft Flow! To make sure the capacity does not keep running, at the end of the day it will be automatically suspended using a second runbook in Azure Automation.
In this Gist I’ve shared the PowerShell script to resume the capacity, and the script to pause/suspend the capacity in another Gist. After you’ve created the two runbooks in Azure Automation, schedule the runbook to pause/suspend the capacity to run daily using a schedule:
The magic button
Now let’s go and create that magic button! Go to the Microsoft Flow editor (https://flow.microsoft.com) and create a new Flow ‘from blank’.
Select ‘Flow button for mobile’ as the category of our trigger:
Then select the actual trigger, called ‘Manually trigger a flow’:
Add a new step to the Flow:
Then, we search for ‘Azure Automation’ and choose the action to ‘Create job’:
And we specify all our values to start the correct runbook:
Edit the name of your Flow by changing the ‘Untitled’ value on the top of the Editor, I’ve called mine ‘Start Power BI Premium’. And click Save!
Now we have a Flow that we can trigger with just a flick of a button from our phone! Open up the mobile app of Microsoft Flow, (download it if you don’t have it installed yet, search for “Microsoft Flow” in the App Store).
You will find the button in the app (sorry for the screenshot in Dutch):
Now you can start the capacity while you are grabbing that double espresso to start a day full of Power BI Premium excitement !
Sharing the button
The greatest part of this setup is that you can share the button with others in the organization!
While you are in the mobile Flow app, tap on the menu of the button and choose ‘Invite others’. Or as you can see in my screenshot, it’s called ‘Anderen uitn.’. You can invite individuals, but I’d recommend using Groups if possible. Sorry for the screenshot in Dutch:
And if a new user of your button opens the mobile Flow app, they see a message stating there is a new button available for them (sorry for the screenshot in Dutch):
That’s it! You and the users you share the button with are now able to start the Azure Power BI Embedded Capacity node with a flick of a button. You can assign the capacity to one or more App Workspaces in the Power BI Service, and you’re good to go!
Enjoy test-driving those Power BI features in the Power BI Service !
Other use-cases for that magic button
This trick where you kick-off something with a flick of a button from your phone can be used for all kinds of scenarios of course! How about:
- Starting your development VM while you get your morning coffee, and arrive at your desk with your VM fired up and ready!
- Scale-up the development SQL database(s) when you are about to finish that mighty new query and are ready to test it.
- Start processing of a (development) Data Model in Power BI / Analysis Services.
Hi, thank you very much for this interesting and exciting approach. Can you tell something about the time between pushing the Button and the capacity being up and running (=usable)?
Also wondering this. Please answer, DAVE!
I must have missed your questions. In my experience the lower tiers are available in a couple of minutes and the higher tiers a couple of minutes later.