You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`comparison_strategy`: How to calculate the delta between the two periods. One of [`"ratio"`, `"difference"`]. Required
79
79
-`interval`: The number of periods to look back. Required
80
80
-`alias`: The column alias for the resulting calculation. Optional
81
81
82
82
## Period to Date ([source](/macros/secondary_calculations/secondary_calculation_period_to_date.sql))
83
83
84
-
Constructor: `period_to_date(aggregate, period [, alias])`
84
+
Constructor: `metrics.period_to_date(aggregate, period [, alias])`
85
85
86
86
-`aggregate`: The aggregation to use in the window function. Options vary based on the primary aggregation and are enforced in [validate_aggregate_coherence()](/macros/secondary_calculations/validate_aggregate_coherence.sql). Required
87
87
-`period`: The time grain to aggregate to. One of [`"day"`, `"week"`, `"month"`, `"quarter"`, `"year"`]. Must be at equal or lesser granularity than the metric's grain (see [Time Grains](#time-grains) below). Required
88
88
-`alias`: The column alias for the resulting calculation. Optional
89
89
90
90
## Rolling ([source](/macros/secondary_calculations/secondary_calculation_rolling.sql))
-`aggregate`: The aggregation to use in the window function. Options vary based on the primary aggregation and are enforced in [validate_aggregate_coherence()](/macros/secondary_calculations/validate_aggregate_coherence.sql). Required
95
95
-`interval`: The number of periods to look back. Required
0 commit comments