In Looker, table calculations provide you with the ability to define new metrics instantaneously using custom formulas. With simple calculations, you can prototype new metrics or create one-off visualizations from your query results without having to wait for a LookML developer to modify the options available in a particular explorer. There are four basic types of table calculations in Looker; string, mathematical, logical, and date and time. String functions operate on query results that are text. For example, they can be used to capitalize letters and words, extract parts of a phrase, check to see if a word or letters is in a phrase, or replace elements of a word or phrase. In this example table, there are dimensions for aircraft category, and country, and a count measure. For some people, this table may not be very easy to read or understand. To make the table easier to interpret, you can concatenate the values from these three fields with some additional text and create a nice, user-friendly sentence in a new field called accident report. In your final visualization, you could then hide aircraft category, country, and count, and simply display the user-friendly sentence in the accident report field that you created with the table calculation. With mathematical functions in Looker, you can apply any math on numeric values such as arithmetic, averages, sums, even running totals and standard deviations. In this example, the order amount rounded table calculation is rounding the amount measure to the nearest decimal with zero places. In other words, the nearest integer. While the average order amount table calculation is calculating the mean of all the amount values. With logical functions, you can check one or more conditions and execute different paths of logic depending on the value. For example, if conditions are very popular for displaying different results depending on whether a particular condition is met. In this example, there is a title dimension referring to box office films and measures for total revenue and total budget. The profit outcome table calculation evaluates whether the total revenue amount for each title is greater than the total budget. If it is, the displayed value is the word profitable. However, if total revenue is less than or equal to total budget, the displayed value is lost money. Finally, date and time functions operate on date time results and allow you to extract time periods and calculate date differences and additions. You can also get the current date, time or date and time and create arbitrary date fields as needed. In this example, there is a created date dimension showing when each user registered on our site. The months of customer table calculation calculates the differences in months between a user's created date and today's date using the diff months and now functions. The join month table calculation extracts the month from the created date using extract months, and then applies logic to label the month name using an if condition. For example, if the number extracted for month is eight, then the output is August. If it's nine, then the output is September, and so on. These examples demonstrate how easy it is to combine different types of functions in one table calculation. In summary, table calculations allow you to create new metrics instantaneously and are incredibly useful for prototyping new metrics or creating one-off visualizations. There are four main types of table calculations in Looker; string, mathematical, logical, and date and time. String functions operate on tests results, while mathematical functions operate on numeric results. Date and time functions operate on date and time results, and logical functions can be used to check one or more conditions and execute different paths of logic depending on the value. Last, you can combine different types of functions in one table calculation to customize your results even further and achieve your desired outcomes.