Exercise - Analyze Azure emissions data

Completed

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:

  1. Go to Power BI.

  2. Select the FL_ESD workspace that you created in the previous exercise, replacing FL with your initials.

  3. Locate and open the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissionsDataset_DTST semantic model.

  4. Select Explore this data.

    Screenshot with the Explore this data option.

  5. Expand emissions_summary and then select SubscriptionName.

  6. Select ServiceCategory.

  7. Expand Emissions_summary measures and then select Total emissions. The table and chart displays, as shown in the following image.

    Screenshot of the demo data files.

  8. Experiment with other combinations and view the results.

  9. 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:

  1. Select the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissionsDataset_DTST semantic model.

  2. Select File and then select Settings.

  3. Expand the Gateway and cloud connections section.

  4. From the Maps to dropdown menu, select Create a connection.

    Screenshot of the create a connection option.

  5. Enter FL Connection for Connection name, replacing FL with your initials.

  6. Select OAuth 2.0 from the Authentication method dropdown menu.

  7. Select Edit credentials.

  8. Enter your credentials.

  9. Select Create to successfully create the connection.

  10. Expand Gateway and cloud connections again.

  11. From the Maps to dropdown menu, select the FL Connection that you created and then select Apply.

    Screenshot with F L Connection selected.

  12. Select View semantic model.

  13. From the menu, select Refresh > Refresh now.

  14. Select Refresh again and then select Refresh history.

  15. After the refresh completes, select Close to close the refresh history.

  16. In the See what already exists section, select the SDS_MAEI_FL_Sustainability_AnalyzeAzureEmissions_RPT report.

  17. Review the compare emissions.

    Screenshot of the Compare emissions tab.

  18. Select the Overview tab and review.

    Screenshot of the emissions Overview tab.

  19. From the Filters, select East US from the Azure region options and then review the changes.

    Screenshot of the Overview tab with the filters applied.

  20. Select All for Azure region.

  21. Go to the Total emissions visualization and select Sep 2021 to Jan 2022.

    Screenshot of the total emissions.

  22. Review the changes.

    Screenshot of the total emissions for the date range.

  23. Select the Compare emissions tab.

  24. Select subscriptions 2 and 7 and then compare them.

  25. Change Type to Resource. Then, select resources 10 and 11 and compare them.

    Screenshot of the total emissions results.

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:

  1. Select the workspace that you created.

  2. Locate and open the SDS_ESGDE_FL_Sustainability_ComputedESGMetrics_LH SQL analytics endpoint.

  3. Select New SQL query.

  4. 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;
    
  5. Select Run. View the query results.

    Screenshot of the results from the query.

  6. Select New SQL query.

  7. 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;
    
    
  8. Select Run. The query results display as shown in the following image.

    Screenshot of the query that returns emissions by subscription for the current year.

  9. Select New SQL query.

  10. 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;
    
    
  11. Select Run. The query results display as shown in the following image.

    Screenshot of the query with highest emissions.