Поделиться через


Separating Tags in Azure Usage Details using *free* Power BI Desktop for Better Data Visualization

The Problem

Azure supports tagging of resources for the longest time; However, one of the complaints I have with this feature is: there is no easy way to separate them into their own column when exporting the usage details (see exhibit 1).

Tagging can be done at resource group or individual resource. The purpose of tags is loosely defined. Most often than not, an organization uses it to tag for cross-charge purposes.

[caption id="" align="alignnone" width="505"] Notice that the Tags column is very messy/unorganized when you have multiple tags.[/caption]

The Solution

If you have worked with JSON on a project or dueled with it extensively, you may have noticed the Tags column in the screenshot above is actually in JSON format.

Enter the Powerful Power BI Desktop...

I am not going to write a long-a** essay to tell you what's Power BI, you will be able to find online articles written by experts with better ability to explain it than I am. I'll leave you with this though: Power BI is an online service that transforms your data into rich visuals [blah blah blah].

Power BI also has a free for download desktop client, go ahead download and install it, I'll wait.

      1. Launch Power BI Desktop

      2. Import the usage data, either download from account.windowsazure.com or ea.azure.com and click “edit” in the import wizard (and since I am such a good person, I have attached a sample usage data at the end of this guide for your convenience)

        [caption id="" align="alignnone" width="634"] Select the Tags column to separate them into their own column[/caption]

        1. Select Tags column
        2. Click on Transform
        3. Click on Parse
      3. Once you have parsed it, click on the small expand icon at the corner in the top cell, like below

        [caption id="" align="alignnone" width="465"] Expand it[/caption]

        1. Click on the expand button

        [caption id="" align="alignnone" width="936"] Tags separated into their own respective columns[/caption]

      4. That's it!

If you have any questions, feel free to comment below.

[Appendix]

  • The sample usage details file: https://1drv.ms/x/s!AthVHX51HSt1n9UXaFIiywn2SDtsvw

[Disclaimer]

The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the author’s discretion. All code samples are provided “AS IS” without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The inclusion of any link does not imply endorsement by Microsoft of the linked site.