Jahresvergleichsberechnungen: Vergleich mehrerer Perioden
Alle Berechnungen der Verhältnisse müssen in einem Datenfluss durchgeführt werden, wenn dieser Vergleichstyp verwendet wird.
Jährlich
Erstellt einen BeastMode für ein Jahr und zeichnet ihn als Kategorie (x-Achse in den meisten Diagrammen)
year(`datumsfeld`)
Vierteljährlich
Erstellt einen BeastMode für ein Quartal und zeichnet ihn als Kategorie (x-Achse in den meisten Diagrammen); wenn er mehrere Jahre deckt, muss year(`datumsfeld`) als Serie verwendet werden.
Quarter(`datumsfeld`)
Monatlich
Erstellt einen BeastMode für einen Monat und zeichnet ihn als Kategorie (x-Achse in den meisten Diagrammen); wenn er mehrere Jahre deckt, muss year(`datumsfeld`) als Serie verwendet werden.
Month(`datumsfeld`)
Wöchentlich
Erstellt einen BeastMode für eine Woche und zeichnet ihn als Kategorie (x-Achse in den meisten Diagrammen); wenn er mehrere Jahre deckt, muss year(`datumsfeld`) als Serie verwendet werden.
WeekofYear(`datumsfeld`)
Täglich
Erstellt einen BeastMode für einen Tag und zeichnet ihn als Kategorie (x-Achse in den meisten Diagrammen); wenn er mehrere Jahre deckt, muss year(`datumsfeld`) als Serie verwendet werden.
DayofYear(`datumsfeld`)
Jahresvergleichsberechnungen mit Verhältnisberechnungen: Vergleich von 2 Perioden
„Dieses Jahr“ und „Letztes Jahr“ können durch anderen Text oder Betragsfelder ersetzt werden. Beim Ausführen von Verhältnissen werden Betragsfelder benötigt.
Der Vorteil der Verwendung von „Gleiche Serien“ anstatt von „Mehrere Serien“ ist die Möglichkeit, den Code mit „Gleiche Serien“ zu konsolidieren. Wenn Sie jedoch „Dieses Jahr“/„Letztes Jahr“ durch Betragsspalten ersetzen, müssen diese getrennt werden.
Jahresvergleich: Vergleich eines vollen Jahres
Mehrere Serien
Aktuelles Jahr
Case when Year(`Datefield`) = Year(curdate()) then 'This Year' end
Vorheriges Jahr
Case when Year(`Datefield`) = Year(curdate())-1 then 'Last Year' end
Gleiche Serie
Case year(`Datefield`) when year(curdate()) then 'This Year' when year(curdate())-1 then 'Last Year’ End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when Year(`Datefield`) = Year(curdate()) then `Amountfield` end / Case when Year(`Datefield`) = Year(curdate())-1 then `Amountfield` end) -1
Jahresvergleich: Jahr-bis-dato-Vergleich
Mehrere Serien
Aktuelles Jahr
CASE WHEN year(`Datefield`)=year(curdate()) THEN 'This Year' END
Vorheriges Jahr
CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (dayofyear(curdate()) >= dayofyear(`Datefield`))) THEN 'Last Year' END
Gleiche Serie
CASE year(`Datefield`) when year(curdate()) THEN 'This Year’ when ((year(`Datefield`)=(year(curdate()) - 1)) AND (dayofyear(curdate()) >= dayofyear(`Datefield`))) THEN 'Last Year' END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN year(`Datefield`)=year(curdate()) THEN `Amountfield` END / CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (dayofyear(curdate()) >= dayofyear(`Datefield`))) THEN `Amountfield` END) -1
Jahresvergleich: Quartalsvergleich
Mehrere Serien
Aktuelles Jahr
Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())-1) then 'Last Year' end
Gleiche Serie
Case when (Quarter(`Datefield`) = Quarter(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' when (Quarter(`Datefield`) = Quarter(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year' End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())) then `Amountfield` end / Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())-1) then `Amountfield` end) -1
Jahresvergleich: Quartal-bis-dato-Vergleich
Mehrere Serien
Aktuelles Jahr
Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate()) and dayofyear(`Datefield`) <= dayofyear(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())-1 and dayofyear(`Datefield`) <= dayofyear(curdate())) then 'Last Year' end
Gleiche Serie
Case when (Quarter(`Datefield`) = Quarter(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' when (Quarter(`Datefield`) = Quarter(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year' End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate()) and dayofyear(`Datefield`) <= dayofyear(curdate())) then `Amountfield` end / Case when (quarter(`Datefield`) = quarter(curdate()) and year(`Datefield`) = year(curdate())-1 and dayofyear(`Datefield`) <= dayofyear(curdate())) then`Amountfield` end) -1
Jahresvergleich: Monatsvergleich
Mehrere Serien
Aktuelles Jahr
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate())-1) then 'Last Year' end
Gleiche Serie
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then Last Year' End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate())) then `Amountfield` end / Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate())-1) then `Amountfield` end) -1
Jahresvergleich: Vergleich von Beginn des Monats bis heute
Mehrere Serien
Aktuelles Jahr
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year)) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then 'Last Year' end
Gleiche Serie
Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then 'This Year' when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year)) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then Last Year' End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then `Amountfield` end / Case when (month(`Datefield`) = month(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year)) and DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate())) then `Amountfield` end) -1
Jahresvergleich: Wochenvergleich
Mehrere Serien
Aktuelles Jahr
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year’ end
Vorheriges Jahr
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year' End
Gleiche Serie
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year’ End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
((Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then `Amountfield` end / Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then `Amountfield` End) -1
Jahresvergleich: Woche-bis-dato-Vergleich
Mehrere Serien
Aktuelles Jahr
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year)) and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then 'Last Year' End
Gleiche Serie
Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then 'This Year' when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then 'Last Year’ End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
((Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(curdate()) and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then `Amountfield` end / Case when (WEEKOFYEAR(`Datefield`) = WEEKOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year)) and DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate())) then `Amountfield` End) -1
Jahresvergleich: Tagesvergleich
Mehrere Serien
Aktuelles Jahr
Case when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' end
Vorheriges Jahr
Case when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year' End
Gleiche Serie
Case when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then 'This Year' when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then 'Last Year' End
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(Case when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(curdate())) then `Amountfield` end / Case when (DAYOFYEAR(`Datefield`) = DAYOFYEAR(curdate()) and year(`Datefield`) = year(date_sub(curdate(), interval 1 year))) then `Amountfield` End) -1
POP-Berechnungen mit Verhältnisberechnungen (Diese Periode im Vergleich zur letzten)
POP: Quartal-bis-zum-nächsten-Quartal-Vergleich
Mehrere Serien
Aktuelle Periode
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (quarter(`Datefield`)=quarter(CURDATE()))) THEN `Amountfield` END
Vorherige Periode
CASE WHEN (quarter(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (quarter(`Datefield`)=4)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (quarter(`Datefield`)=(quarter(CURDATE()) -1))) THEN `Amountfield` END ) END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (quarter(`Datefield`)=quarter(CURDATE()))) THEN `Amountfield` END / CASE WHEN (quarter(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (quarter(`Datefield`)=4)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (quarter(`Datefield`)=(quarter(CURDATE()) -1))) THEN `Amountfield` END ) END) -1
POP: Quartal-bis-dato-/Quartal-bis-zum-nächsten-Quartal-Vergleich
Mehrere Serien
Aktuelle Periode
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (quarter(`Datefield`)=quarter(CURDATE()))) THEN `Amountfield` END
Vorherige Periode
MAX(CASE WHEN YEAR(curdate()) / 4 = ROUND((YEAR(curdate()) / 4),0) THEN
CASE WHEN QUARTER(curdate())=1 THEN (DAYOFYEAR(curdate()) - 1)
WHEN (QUARTER(curdate())=2) THEN (DAYOFYEAR(curdate()) - 91)
WHEN (QUARTER(curdate())=3) THEN (DAYOFYEAR(curdate()) - 182)
WHEN (QUARTER(curdate())=4) THEN (DAYOFYEAR(curdate()) - 273)
ELSE 0 END
ELSE CASE
WHEN QUARTER(curdate())=1 THEN DAYOFYEAR(curdate()) - 1
WHEN QUARTER(curdate())=2 THEN DAYOFYEAR(curdate()) - 90
WHEN QUARTER(curdate())=3 THEN DAYOFYEAR(curdate()) - 181
WHEN QUARTER(curdate())=4 THEN DAYOFYEAR(curdate()) - 272
ELSE 0 END
END) * MAX(CASE WHEN YEAR(curdate()) / 4=ROUND(YEAR(curdate()) / 4,0) THEN
CASE WHEN (QUARTER(curdate())=1) THEN 91
WHEN (QUARTER(curdate())=2) THEN 91
WHEN (QUARTER(curdate())=3) THEN 92
WHEN (QUARTER(curdate())=4) THEN 92
ELSE 0 END
ELSE CASE
WHEN (QUARTER(curdate())=1) THEN 90
WHEN (QUARTER(curdate())=2) THEN 91
WHEN (QUARTER(curdate())=3) THEN 92
WHEN (QUARTER(curdate())=4) THEN 92
ELSE 0 END
END) - MAX(CASE WHEN YEAR(curdate()) / 4=ROUND(YEAR(curdate()) / 4,0) THEN
CASE WHEN QUARTER(curdate())=1 THEN DAYOFYEAR(curdate()) - 1
WHEN QUARTER(curdate())=2 THEN DAYOFYEAR(curdate()) - 91
WHEN QUARTER(curdate())=3 THEN DAYOFYEAR(curdate()) - 182
WHEN QUARTER(curdate())=4 THEN DAYOFYEAR(curdate()) - 273
ELSE 0 END
ELSE CASE
WHEN QUARTER(curdate())=1 THEN DAYOFYEAR(curdate()) - 1
WHEN QUARTER(curdate())=2 THEN DAYOFYEAR(curdate()) - 90
WHEN QUARTER(curdate())=3 THEN DAYOFYEAR(curdate()) - 181
WHEN QUARTER(curdate())=4 THEN DAYOFYEAR(curdate()) - 272
ELSE 0 END
END) + SUM(CASE WHEN QUARTER(curdate())=QUARTER(`Datefield`) AND YEAR(`Datefield`)=YEAR(curdate()) THEN `Amountfield` ELSE 0 END) -
SUM((CASE WHEN ((QUARTER(curdate())=QUARTER(`Datefield`)) AND (YEAR(`Datefield`)=YEAR(DATE_SUB(curdate(),INTERVAL 1 QUARTER)))) THEN `Amountfield` ELSE 0 END ))) / SUM((CASE WHEN QUARTER(DATE_SUB(curdate(),INTERVAL 1 QUARTER))=QUARTER(`Datefield`) AND YEAR(`Datefield`)=YEAR(DATE_SUB(curdate(),INTERVAL 1 QUARTER)) THEN `Amountfield` ELSE 0 END ))
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
Nehmen Sie die obige Formel und fügen Sie die zwei vorherigen Abschnitte ein, um Ergebnisse zu erhalten.
POP: Monat-zu-Monat-Vergleich
Mehrere Serien
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=month(CURDATE()))) THEN `Amountfield` END
CASE WHEN (month(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (month(`Datefield`)=12)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=(month(CURDATE()) -1))) THEN `Amountfield` END ) END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=month(CURDATE()))) THEN `Amountfield` END / CASE WHEN (month(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (month(`Datefield`)=12)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=(month(CURDATE()) -1))) THEN `Amountfield` END ) END) -1
POP: Von-Beginn-des-Monats-bis-heute/Monat-zu-Monat-Vergleich
Mehrere Serien
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=month(CURDATE()))) THEN `Amountfield` END
CASE WHEN month(curdate()) = 1 THEN CASE WHEN year(`Datefield`) = year(curdate()) - 1 AND month(`Datefield`) = 12 AND DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate()) THEN `Amountfield` END ELSE CASE WHEN year(`Datefield`) = year(curdate()) AND month(`Datefield`) = month(curdate())-1 AND DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate()) THEN `Amountfield` END END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (month(`Datefield`)=month(CURDATE()))) THEN `Amountfield` END / CASE WHEN month(curdate()) = 1 THEN CASE WHEN year(`Datefield`) = year(curdate()) - 1 AND month(`Datefield`) = 12 AND DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate()) THEN `Amountfield` END ELSE CASE WHEN year(`Datefield`) = year(curdate()) AND month(`Datefield`) = month(curdate())-1 AND DAYOFMONTH(`Datefield`) <= DAYOFMONTH(curdate()) THEN `Amountfield` END END) -1
POP: Wochenvergleich
Mehrere Serien
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=weekofyear(CURDATE()))) THEN `Amountfield` END
CASE WHEN (weekofyear(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (weekofyear(`Datefield`)=52)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=(weekofyear(CURDATE()) -1))) THEN `Amountfield` END ) END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=weekofyear(CURDATE()))) THEN `Amountfield` END / CASE WHEN (weekofyear(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (weekofyear(`Datefield`)=52)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=(weekofyear(CURDATE()) -1))) THEN `Amountfield` END ) END) -1
POP: Woche-bis-dato/Wochenvergleich
Mehrere Serien
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=weekofyear(CURDATE()))) THEN `Amountfield` END
CASE WHEN weekofyear(curdate()) = 1 THEN CASE WHEN year(`Datefield`) = year(curdate()) - 1 AND weekofyear(`Datefield`) = 52 AND DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate()) THEN `Amountfield` END ELSE CASE WHEN year(`Datefield`) = year(curdate()) AND weekofyear(`Datefield`) = weekofyear(CURDATE()) -1 AND DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate()) THEN `Amountfield` END END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (weekofyear(`Datefield`)=weekofyear(CURDATE()))) THEN `Amountfield` END / CASE WHEN weekofyear(curdate()) = 1 THEN CASE WHEN year(`Datefield`) = year(curdate()) - 1 AND weekofyear(`Datefield`) = 52 AND DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate()) THEN `Amountfield` END ELSE CASE WHEN year(`Datefield`) = year(curdate()) AND weekofyear(`Datefield`) = weekofyear(CURDATE()) -1 AND DAYOFWEEK(`Datefield`) <= DAYOFWEEK(curdate()) THEN `Amountfield` END END) -1
POP: Tagesvergleich
Mehrere Serien
CASE WHEN ((year(`Datefield`)=year(curdate())) AND (dayofyear(`Datefield`)=dayofyear(CURDATE()))) THEN `Amountfield` END
CASE WHEN (dayofyear(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (dayofyear(`Datefield`)=365)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (dayofyear(`Datefield`)=(dayofyear(CURDATE()) -1))) THEN `Amountfield` END ) END
Verhältnis: %-Änderung zwischen den beiden anhand der Formel (C/P) -1
(CASE WHEN ((year(`Datefield`)=year(curdate())) AND (dayofyear(`Datefield`)=dayofyear(CURDATE()))) THEN `Amountfield` END / CASE WHEN (dayofyear(curdate())=1) THEN (CASE WHEN ((year(`Datefield`)=(year(curdate()) - 1)) AND (dayofyear(`Datefield`)=365)) THEN `Amountfield` END ) ELSE (CASE WHEN ((year(`Datefield`)=year(curdate())) AND (dayofyear(`Datefield`)=(dayofyear(CURDATE()) -1))) THEN `Amountfield` END ) END) -1
Kommentare
0 Kommentare
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.