Skip to main content

PowerBi Azure Cost Management exposing Tag values to be used

I wrote an article about exposing tags to be used in PowerBi using the connector “Microsoft Azure Consumption Insights (Beta)” (Using Azure tags in your powerbi reporting). If you recall there is a warning message when you use the connector which states that it is still under development. It seems like there is no development for this connector as it has been in “beta” for a long time. I noticed that there is a new connector called “Azure Cost Management” which I will walk through which seems easier to configure. I googled around and decided to combine all my findings in to one document.

First as we are connecting via our Enterprise agreement, we need to ensure at minimum that we have “Enterprise Administrator (read only)” permissions within the EA portal. Once we have that we should be able login to https://ea.azure.com and see our enrollment number on the top left of the portal which we will need to note down.

When you start up PowerBi desktop if you get the start-up screen then select “Get data” otherwise on the menu bar select “Get Data > More”. A new window will open up select “Azure” then select “Azure Cost Management” and click “Connect”.

Under “Choose Scope, select “Enrollment Number”, input your enrollment number that we have gathered from earlier step, followed by the number of months we would like to report costing for then click “OK”.

If you haven’t signed in then click on “Sign in”.

If your account is not listed the select “Use another account” and follow the instructions. If your account is listed then select that particular account.

You will be taken back to the sign in screen for Azure Cost Management connector. You should see “You are currently signed in” and click “Connect”

Wait for it to load the tables and we will just select "Usage details" table for now and click "Load"

Once the table has loaded go to the menu bar and select “Transform data > Transform data”

Power query editor should load up. Head to the menu bar and select "Add Column" tab the select "custom column"

A new window will appear to create the new column. Give the new column a name which I have used "CustomTags" (You can name the column whatever you like). In the “Custom column formula” box after the "=" sign enter the following Text.Combine({"{ ", [Tags], " }"}) and click "OK". Please notice the "spaces" and lower/upper cases for the letters as they are important. This formula basically goes to the Tags column and for each row adds the curly brackets to the start and the end of the data so that it is in a JSON format.

The new column will appear at the far right of the table click anywhere on the header and select Transform > JSON

Once that is completed click on the expand icon on the column and wait for the values to load up

Once loaded select the tag names that you wish to expand in to columns to be used for reporting

You should now see the columns you have selected in your table. By default the column name format is <%CustomColumnName%.%TagName%>

On the home menu bar click on “Close and Apply” so that this query is saved. You should now be able to select your new “tag” columns to be used in your reporting.


Going forward I think Microsoft will be doing more development with this connector so it will be best to start using this or migrating to using this.

Comments

Popular posts from this blog

Rolling back a version of ESXi

There is an option in VMware where after you have performed an major upgrade of ESXi you can roll back to your previous version. The benefit of this is that you would not need to reinstall your ESXi and its configuration if you had issues with the new software. I had to do this on one occassion in my lab where I upgraded from 6.5 to 6.7 and my VMs would not run because the CPU was not supported in 6.7. Please remember if you are using ISO method to upgrade ESXi please ensure you select "Upgrade ESXi, preserve VMFS datastore". Selecting "Install ESXi, preserve VMFS datastore" does not mean preserving datastore means retaining ESXi as it will still do a clean install of ESXi. This method does not work for vSphere 7.0 as there are changes to the partitions on the boot device. Below are the steps to roll back to a previous version which is quite straight forward. As always perform an backup of your host configuration before you upgrade or rollback ( KB2042141 ). I have

Configuring ESXi 6 host to send logs to Syslog Server

In my previous post I talked about configuring VMware Syslog server for Windows which is installed and enabled by default on installation of vCenter 6 for Windows. I will now describe the basic configuration that is required on an ESXi 6 host to be able to send logs out to a syslog server using my vCenter as the example. 1) Navigate to your ESXi host within vCenter. Go to "Manage" tab and select "Settings" followed by "Advanced System Settings". Look for the settings "Syslog.global.loghost" and highlight this settings. Click the pencil icon to edit the configuration for this setting. 2) You can now add the host name or ip address of your syslog server/s. You can enter just hostname or IP address, use udp://hostname:514 or ssl://hostname:1514 to be more specific on the port and protocol to be used. If you have multiple hosts then you use the comma (,) to separate each server i.e. udp://192.168.0.1:514,udp://192.168.0.2:514 3)We n

Access vSphere Web client blank page in Chrome

Today I came across in my LAB where when I tried to access my vSphere Web Client in chrome and I just get a blank web page with no error message. At first I thought my vCenter Web client service was having issues and did a couple of restart. I then decided to use firefox and internet explorer to make sure it was not a browser problem and it appeared to work in the other browsers. Next I decided to clear all the cache in Chrome and it still didn't work at all !!!. Last resort for me was to try and reset the browser settings to their original defaults which worked. So to reset the browser settings to default you need to: Open chrome > Open Settings > Show Advanced Settings > Reset browser Settings > Reset Close Chrome and open again and if you was using self-signed certificates click "Proceed anyway" Just a word of warning of reset browser settings where you will lose all your settings. There is an article on VMware website but it is for issues with acc