what is the best practice in terms of code modularity for implementing time intelligence & comparison such as:
- Month-To-Date: value of a given KPI from the beginning of current month to today
- Month-To-Date Previous Year: previous year value of a given KPI from the beginning of current month to today
- Month-To-Date vs. PY: [Month-To-Date] - [Month-To-Date Previous Year]
Since the formulas for this KPIs are standard, ideally they are defined in one single place and then referred when needed to apply such time intelligence / comparison.
For example, in Power BI the standard is to use Calculation Groups. What is the Looker equivalent of this approach?