Billing reports: Analyzing your costs by project hierarchy

Viewing your costs by project hierarchy helps you analyze costs by folder or organization. For example, if you use folders in an organization to represent cost centers, you can effectively configure your report to group all costs by those cost centers.

To analyze your costs by project hierarchy, including costs by Organizations or costs by Folders, set the report's Group by option to Project hierarchy. You can also use the report's Folders & Organizations filter to select specific folders/organizations to focus the data returned in the report.

Shows report configured to group by project hierarchy.

About project and resource hierarchy

Projects form the basis for creating, enabling, and using all Google Cloud services. Folders are used to group projects under the organization node in a resource hierarchy. A folder can contain projects, other folders, or a combination of both. Each resource has exactly one parent.

Metaphorically speaking, the Google Cloud resource hierarchy resembles the file system found in traditional operating systems as a way of organizing and managing entities hierarchically. From a cost management perspective, you might use folders in an organization to represent cost centers (such as Devops or Finance). You can view your costs by project hierarchy to analyze your costs by folder.

Project hierarchy is the ancestry of a project, the resource hierarchy mapping of the project (Organization > Folder > Project). Projects can stand alone (that is, not be associated with any folders or organizations) or be the child of an Organization or Folder. Project hierarchy tracks the current and historical project ancestry. For example, changing a project's name, or moving a project to a different folder or organization, affects the historical project ancestry.

To gain a deeper understanding about resource hierarchy and Cloud Billing, refer to Cloud Billing concepts, Resource hierarchy .

Configure your report to show project hierarchy

To view your costs by project hierarchy (organization > folder > project), take the following steps:

  1. In the Google Cloud console, open the Reports page for the Cloud Billing account you want to analyze.
  2. In the report Filters, set a Time range to use a starting date on or after January 1, 2022.
  3. In the Group by selector, choose Project hierarchy.

    The report returns a row for each unique combination of Organization > Folder > Project, and the table includes columns for Project, Project ID, Project number, and Project hierarchy.

    The values listed in the Project hierarchy column show Organization name > Folder name.

Analyze the report when grouped by Project hierarchy

  • You can sort the table data on different columns to view the project hierarchy costs in different ways:

    • To visualize all of the projects that have the same project hierarchy, sort the table by the Project hierarchy column.
    • To visualize if you have the same project associated with more than one ancestry, sort the table by the Project ID column.
  • You can narrow the report's project hierarchy results using the Folders & Organizations filter.

  • While you are viewing the report grouped by Project hierarchy, if you change the report's time range to include a starting date prior to January 1, 2022, the Group by selection is automatically updated to group by Project.

  • If you select some folders or organizations in the filter, and then update the time range to include a starting date prior to January 1, 2022, the folders/organizations selections are removed.

Understand and analyze changes in project ancestry

For the time range you are analyzing, it is possible for the same Project to be listed in more than one row in the report table. This can occur if something related to the project's ancestry has changed. Changes that affect a project's ancestry include the following:

  • Changing the project's name
  • Moving the project to a different organization and/or folder
  • Changing a parent folder's name
  • Moving a parent folder into another folder and/or organization

To visualize if you have projects associated with more than one ancestry, sort the table data by the Project ID column.

Examples of changes in project hierarchy

The following examples show different scenarios where something related to the project's ancestry was changed, and how that change impacts the results in the report, depending on how you Group the results.

All of these examples assume that the changes affecting the project ancestry occurred after January 1, 2022.

Example 1: Project name change

You can edit a project's display name, but the project ID and the project number are immutable and remain constant.

Group by Project

Project (name) Project ID Project number
Current Project Name my-project-1 123456

Group by Project hierarchy

Project (name) Project ID Project number Project hierarchy
Old Project Name my-project-1 123456 Org1.net > folder1
Current Project Name my-project-1 123456 Org1.net > folder1

Notes about project name changes when grouping by project hierarchy:

  • For the report's time range, if the project has not incurred any usage after the name is changed, then you will only see one row for the project, listed as Old Project Name.
  • For the report's time range, if the selected time range starts after the date the project's name was changed, then you will only see one row for the project, listed as Current Project Name.
  • If you use the Project filter to select a project, the project's name displayed in the list of options is always the Current Project Name. The project ID is not editable and remains the same after a project's name is edited.

Example 2: Project moved to a different parent folder

In this example, My test project is moved from folder1 to folder2. After the move, My test project is now a child of folder2. Folders are always the child of a parent organization.

Group by Project

Project (name) Project ID Project number
My test project my-project-1 123456

Group by Project hierarchy

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net > folder1
My test project my-project-1 123456 Org1.net > folder2

Example 3: Parent folder moved into a different folder

In this example, folder1 is moved into test folder. After the move, folder1 is now a child (or subfolder) in the parent test folder. Folders are always the child of a parent organization.

Group by Project

Project (name) Project ID Project number
My test project my-project-1 123456

Group by Project hierarchy

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net > folder1
My test project my-project-1 123456 Org1.net > test folder > folder1

Example 4: Name change of a parent folder

You can edit a folder's display name, but the folder ID is immutable and remains constant.

Group by Project

Project (name) Project ID Project number
My test project my-project-1 123456

Group by Project hierarchy

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net > Folder Old Name
My test project my-project-1 123456 Org1.net > Folder New Name

Notes about folder name changes when grouping by project hierarchy:

  • For the report's time range, if the folder's projects have not incurred any usage after the folder's name is changed, then you will only see one row for the folder, listed as the Org > old folder name.
  • For the report's time range, if the selected time range starts after the date the folder's name was changed, then you will only see one row for the folder, listed as the Org > current folder name.
  • If you use the Folders & Organizations filter to select a folder, the folder's name displayed in the list of options is always the Current Folder Name. The folder ID (displayed below the folder name) is not editable and remains the same after a folder's name is edited.

Example 5: Project moved to a different organization

In this example, My test project is moved from Org1.net to Org2.com, and the project is not in any folder. After the move, My test project is now a child of Org2.com.

Group by Project

Project (name) Project ID Project number
My test project my-project-1 123456

Group by Project hierarchy

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net
My test project my-project-1 123456 Org2.com

Example 6: Project moved to a different billing account

Cloud Billing accounts exist outside of the project's resource hierarchy. If you move a project to a different billing account, the project hierarchy remains attached to the project.

Grouped by Project hierarchy

Viewing report for OLD billing account

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net > Folder1

Viewing report for NEW billing account

Project (name) Project ID Project number Project hierarchy
My test project my-project-1 123456 Org1.net > Folder1