Azure tags help categorize cloud spend across departments, environments, applications, and more. When included in your exported billing data, tags can power deep analysis for budgeting, chargeback, or showback purposes.
π§Ύ 1. Understand Tag Format in Exports
Tag data appears in the Tags
column of your exported cost CSV:
Account Type | Format |
---|---|
MCA / Pay-As-You-Go | JSON string (e.g. {"Environment":"Prod","Dept":"Finance"} ) |
EA | May be JSON or semicolon-delimited (e.g. Environment:Prod;Dept:Finance ) |
β Tip: Check the structure in a sample file before proceeding.
π οΈ 2. Parse Tags into Columns
In Power BI (Power Query):
- If the
Tags
column is JSON:- Select the column > go to Transform > JSON > Parse.
- Use
Json.Document([Tags])
in a Custom Column. - Expand the resulting record into new columns like
Environment
,Dept
, etc.
- If tags are in
key:value;key:value
format:- Use Split Column by Delimiter, then parse each pair manually.
In Synapse / SQL:
- If the column is JSON: sqlCopyEdit
JSON_VALUE([Tags], '$.Environment') AS Environment
- For multiple tags, use
OPENJSON
to flatten into rows and pivot as needed.
π 3. Analyze by Tags
π Filter by Tag
- Power BI: Add a Slicer using the parsed tag column (e.g.,
Dept
orEnvironment
). - Azure Portal: Use Cost Management > Cost Analysis, then filter by tag key/value.
π Group by Tag
- Power BI / Excel:
- Use tag columns in visuals:
- Pie chart: Cost by
Application
- Bar chart: Monthly cost by
Environment
- Pie chart: Cost by
- Use tag columns in visuals:
- Azure Portal:
- Use Group by Tag: [key] from the dropdown in Cost Analysis.
𧱠4. Handle Missing or Incomplete Tags
- Resources without tags will show blanks in the
Tags
field. - Tags are captured at the time of cost generationβchanges are not retroactive.
- Consider enabling tag inheritance (e.g., inherit from Resource Group) for untagged resources.
𧩠5. Multi-Tag Analysis
- Combine multiple tags in reports:
- Use two slicers (e.g.,
Project
+Environment
). - Or create a composite field (e.g.,
Project - Environment
).
- Use two slicers (e.g.,
- Model tags as columns for simplicity, or as a separate table for flexibility.
π§ͺ 6. Troubleshooting Missing Tags
- Confirm youβre using the latest export schema.
- Make sure tags were present during the billing period.
- Azure supports up to 50 tags per resourceβall should export unless restricted by format or API version.
β Summary
Task | Tool | Method |
---|---|---|
Parse tags | Power BI | Json.Document([Tags]) and expand |
Query tags | SQL / Synapse | JSON_VALUE() or OPENJSON |
Filter/group by tag | Power BI, Excel, Portal | Use tag columns in visuals or slicers |
Handle untagged resources | Azure Settings | Enable tag inheritance from Resource Group |
By parsing and using tags in your cost data, you can break down cloud spend by any business dimensionβprojects, teams, environments, owners, or cost centersβunlocking powerful FinOps insights.