Best practises for Total metrics in datasets

Hi, i am just wondering what is your opinion about including TOTAL metrics in a dataset.

I have a dataset that has a metric Revenue A and a metric Revenue B. Very often, users will want to see only Total Revenue ( which equals to SUM of Revenue A and Revenue B). 

What is the best practise here - should I include the Total Revenue in the dataset, or create it as a measure in Looker? What are the pros and cons?

Thank you

0 1 113
1 REPLY 1

Hi David, 

This question is pretty specific to your use case and we have many customers who use only measures and others who create in the dataset. Best practices are as follows:

  • If this total often has other filters applied which a user can change, then it is best to define as a measure in LookML.
  • If the total is pretty static, and doesn't rely on dynamic user input then it can be defined in your dataset instead.
  • If revenue A & B are coming from different tables and is a complex join to generate the sum, it is likely better to complete this join & calculation in your database and not LookML.
Top Labels in this Space
Top Solution Authors