In this chapter, we are going to learn how you can create and add measures and use them in your visualizations making. We’ll learn how to add simple aggregation measures based on a single field right away from the tile making fields menu as a custom field, and then we will dive into the LookML code and write more complex measures that will be added directly as a field to your view.
Finally, we’ll learn how to use Looker’s SQL Runner in order to write and run your own SQL queries in extreme cases –
For instance, when you want to do something and don’t seem to work it out using Looker’s features and LookML in the process of a dashboard’s tile making.
For that, we will go over a nice use case of using SQL to make a derived table from an existing one and adding it to its project.
I recommend only using SQL when there is no other choice, since in terms of better performance and simplicity you should stick to LookML.
*For our use cases we are going to use an example dataset of Worldometer Coronavirus Daily Data. You can learn from the following examples and try it out and implement with your data in your projects later on.