Creating metrics | dbt Developer Hub
Metrics can be defined in the same or separate YAML files from semantic models within the same dbt project repo.