Convert Azure tags in Power BI
If you are using Power BI and pulling data from Azure Cost Management you will most likely want to extract data from tags created within Azure. This isn't as easy as it seems.
Assuming you are familiar with Power BI and have imported data from Azure Cost Management - here are the steps to making them usable;
- Edit the query for the data set that contains the tags such as 'Usage details'.
- Add a Custom Column to the dataset.
- Give the column a name and add { and } around the Tags column for the formula as shown in the diagram below (this is to make it a proper JSON type).
- Find the new custom column, right click the column header and select Transform and then JSON.
- Expand the JSON records now in the column to select the tags.
- Select the tags you want to be able to use and click OK. Note this takes a while to load and may not load all possible values, if this is the case click on the 'Load more' link.
- The selected tags appear as new columns in the dataset, with the column name the tag key and the tag values as the column values.
- Close and apply the changes to the dataset. Once done the dataset fully reloads which may take a while.
- The columns are now usable columns within the dataset.