Exercise - Analyze Azure emissions data
In this exercise, you use different approaches to analyze the Azure emissions data that you ingested into your Fabric workspace.
Explore data
To explore your data, follow these steps:
Go to Power BI.
Select the FL_ESD workspace that you created in the previous exercise, replacing FL with your initials.
Locate and open the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissionsDataset_DTST semantic model.
Select Explore this data.
Expand emissions_summary and then select SubscriptionName.
Select ServiceCategory.
Expand Emissions_summary measures and then select Total emissions. The table and chart displays, as shown in the following image.
Experiment with other combinations and view the results.
When you finish, close the Explorer window and select do not save. Stay on this page.
Explore the prebuilt report
To explore the prebuilt report, follow these steps:
Select the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissionsDataset_DTST semantic model.
Select File and then select Settings.
Expand the Gateway and cloud connections section.
From the Maps to dropdown menu, select Create a connection.
Enter FL Connection for Connection name, replacing FL with your initials.
Select OAuth 2.0 from the Authentication method dropdown menu.
Select Edit credentials.
Enter your credentials.
Select Create to successfully create the connection.
Expand Gateway and cloud connections again.
From the Maps to dropdown menu, select the FL Connection that you created and then select Apply.
Select View semantic model.
From the menu, select Refresh > Refresh now.
Select Refresh again and then select Refresh history.
After the refresh completes, select Close to close the refresh history.
In the See what already exists section, select the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissions_RPT report.
Review the compare emissions.
Select the Overview tab and review.
From the Filters, select East US from the Azure region options and then review the changes.
Select All for Azure region.
Go to the Total emissions visualization and select Sep 2021 to Jan 2022.
Review the changes.
Select the Compare emissions tab.
Select subscriptions 2 and 7 and then compare them.
Change Type to Resource. Then, select resources 10 and 11 and compare them.
You can try different combinations and compare the emissions.
Run queries by using the SQL analytics endpoint
To run queries by using the SQL analytics endpoint, follow these steps:
Select the workspace that you created.
Locate and open the SDS_ESGDE_FL_Sustainability_ComputedESGMetrics_LH SQL analytics endpoint.
Select New SQL query.
Paste the following query, replacing FL with your initials. This query returns total emissions by region and service category.
SELECT es.AzureRegionDisplayName, es.ServiceCategory, es.DateFormat, SUM( es.Scope1CarbonEmission + es.Scope2MarketCarbonEmission + es.Scope3CarbonEmission ) AS TotalCarbonEmissions FROM [SDS_ESGDE_FL_Sustainability_ComputedESGMetrics_LH].[dbo].[azure_emissions] es GROUP BY es.AzureRegionDisplayName, es.ServiceCategory, es.DateFormat ORDER BY es.DateFormat DESC, es.AzureRegionDisplayName;
Select Run. View the query results.
Select New SQL query.
Paste the following query, replacing FL with your initials. This query returns emissions by subscription for the current year.
SELECT es.SubscriptionId, es.SubscriptionName, SUM(es.Scope1CarbonEmission + es.Scope2MarketCarbonEmission + es.Scope3CarbonEmission) AS TotalEmissions FROM [SDS_ESGDE_FL_Sustainability_ComputedESGMetrics_LH].[dbo].[azure_emissions] es WHERE LEFT(CAST(es.DateKey AS VARCHAR(8)), 4) = '2023' -- Replace '2023' with the desired year GROUP BY es.SubscriptionId, es.SubscriptionName ORDER BY TotalEmissions DESC;
Select Run. The query results display as shown in the following image.
Select New SQL query.
Paste the following query, replacing FL with your initials. This query returns the top five resources with the highest emissions.
SELECT TOP 5 es.ResourceId, es.ResourceName, es.AzureRegionDisplayName, SUM(COALESCE(es.Scope1CarbonEmission, 0) + COALESCE(es.Scope2MarketCarbonEmission, 0) + COALESCE(es.Scope3CarbonEmission, 0)) AS TotalEmissions FROM [SDS_ESGDE_FL_Sustainability_ComputedESGMetrics_LH].[dbo].[azure_emissions] es GROUP BY es.ResourceId, es.ResourceName, es.AzureRegionDisplayName ORDER BY TotalEmissions DESC;
Select Run. The query results display as shown in the following image.