By default Components are available in the Project dimension and grouped under each project. However, this is not very handy if you have the same components across projects.
You might want to import Component as a separate dimension to group data.
Please see the documentation with the example on how to do this with JavaScipt calculated custom fields: JavaScript calculated custom fields.