Alexander Penzin
07/29/2022, 12:55 PMMoises Morales
07/29/2022, 1:33 PMSELECT (SELECT SUM(fact)) where Year (Date) = this and Day of Year (Date) < this
• Metric2 (Previous year):
SELECT (SELECT SUM(fact)) where Year (Date) = this - 1 and Day of Year (Date) < this -1
• Metric 3 (% change):
SELECT "Current year" / "Previous year" -1
Moises Morales
07/29/2022, 1:33 PMAlexander Penzin
07/29/2022, 1:34 PMMoises Morales
07/29/2022, 1:35 PMJakub Sterba
07/29/2022, 5:29 PMselect sum(fact)/(select sum(fact) for previous (Year (Date)) -1
such metric can be broken down by Year(Date) attribute and will display % difference between the years. The solution with time macro “this” in previous posts compares only current (this) year with previous year.