βœ… How to View Azure Billing Data in Azure Synapse or Power BI

After exporting your Azure cost data to a Storage Account, you can analyze it using Azure Synapse Analytics or Power BI. Choose your tool based on whether you prefer in-place querying, pipelines, or visualization dashboards.


πŸ“Š Option 1: Use Azure Synapse Analytics

πŸ”Ž A. Query with Serverless SQL

  1. Ensure Hierarchical Namespace is enabled on your Storage Account (Data Lake Gen2).
  2. In Synapse Studio, use OPENROWSET or create external tables to query exported CSV/Parquet files directly.

Example query:

sqlCopyEditSELECT * 
FROM OPENROWSET(
  BULK 'https://<storage-account>.dfs.core.windows.net/<container>/cost-exports/*.csv',
  FORMAT = 'CSV',
  PARSER_VERSION = '2.0'
) AS rows

πŸ”„ B. Load Data via Synapse Pipeline

  1. Create a pipeline in Synapse or Azure Data Factory.
  2. Copy daily cost export files into:
    • A dedicated SQL pool, or
    • A Data Lake folder in Parquet format.
  3. Schedule the pipeline to run after your daily export.

πŸ”¬ C. Use Synapse Spark

  1. Open a Spark notebook in Synapse.
  2. Read the cost file into a DataFrame: pythonCopyEditdf = spark.read.csv("abfss://<container>@<storage-account>.dfs.core.windows.net/cost-exports/") df.show()
  3. Use Spark for data transformation or join with other datasets.

πŸ” Access Requirements

  • Assign Storage Blob Data Reader to your Synapse workspace managed identity on the Storage Account.
  • Use wildcard paths if your export is partitioned across multiple files.

πŸ“ˆ Option 2: Use Power BI

⚑ A. Use the Azure Cost Management Connector (Recommended)

  1. In Power BI Desktop, go to:
    • Get Data > Azure > Microsoft Cost Management.
  2. Choose your scope:
    • Billing Account ID (for MCA)
    • Enrollment Number (for EA)
  3. Sign in with Azure credentials and import your data.

βœ… Result: Power BI connects directly to the Cost Management API β€” no storage export required.


πŸ—ƒοΈ B. Import from Azure Storage

Use this method if you’re working with exported CSV/Parquet files.

For CSV:

  1. Use Azure Blob Storage or Azure Data Lake Gen2 connector.
  2. Provide the Storage URL or connect via SAS token.
  3. Use Power Query to combine and transform files.

For Parquet:

  1. Use Azure Data Lake Gen2 connector.
  2. If needed, install the Parquet connector for older Power BI versions.

πŸ” Refreshing Data in Power BI

  • Schedule automatic data refreshes in Power BI Service.
  • Ensure your dataset can access the storage (via gateway or direct cloud access).

🧠 Summary

ToolApproachNotes
SynapseQuery in place or ingest via pipelineBest for advanced analysis or joining with enterprise data
Power BIDirect API connector or import from StorageFastest setup with Cost Management connector for supported accounts

Once connected, filter by subscription, resource group, service, or tag to identify cost trends.