Mit Tabellenkalkulationen eine fortlaufende Summe in Spalten erstellen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie die entsprechenden Berechtigungen zum Erstellen von Tabellenberechnungen haben, können Sie anstelle der auf dieser Seite beschriebenen Methoden Tastenkürzel für Berechnungen verwenden. Mit Kurzbefehlsberechnungen können Sie gängige Berechnungen für numerische Felder in der Datentabelle eines Explores ausführen, ohne Looker-Funktionen und -Operatoren verwenden zu müssen.
Mit Tabellenkalkulationen können Sie Ad-hoc-Messwerte erstellen und Berechnungen auf die Daten anwenden, die von einer Explore-Abfrage zurückgegeben werden. Das ist praktisch, um Messwerte wie laufende Summen zu berechnen.
Auf dieser Seite erfahren Sie, wie Sie in der Datentabelle eines explorativen Datenanalysetools eine fortlaufende Summe nach Spalten berechnen. Mithilfe von Tabellenkalkulationen können Sie auch eine fortlaufende Summe über Zeilen hinweg erstellen. Weitere Informationen finden Sie auf der Best Practices-Seite Zeilenübergreifende Aggregation (Zeilensummen) in Tabellenkalkulationen.
running_total()-Funktion verwenden
Wenn Sie mithilfe von Tabellenkalkulationen eine fortlaufende Summe in einer Spalte erstellen möchten, können Sie die Funktion running_total() verwenden. Sie gibt die fortlaufende Summe der Werte in einer bestimmten Spalte zurück.
Wenn Sie beispielsweise in der folgenden Daten-Tabelle des Explores eine fortlaufende Summe für die Spalte Anzahl der Inventarelemente erstellen möchten, die nach Datum der Erstellung von Inventarelementen gruppiert ist, können Sie diese Tabellenberechnung erstellen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-30 (UTC)."],[],[],null,["# Creating a running total down columns with table calculations\n\n\u003e As an alternative to the methods described on this page, when you have the appropriate [permissions](/looker/docs/admin-panel-users-roles#create_table_calculations) to create table calculations, you can use [shortcut calculations](/looker/docs/table-calculations#quick_calculations). Shortcut calculations let you perform common calculations on numeric fields that are in an Explore's data table without the need to use Looker [functions and operators](/looker/docs/functions-and-operators).\n\n\n[Table calculations](/looker/docs/table-calculations) let you create ad hoc metrics and perform calculations on the data that is returned by an Explore query. This is convenient for calculating metrics like running totals.\n\n\nThis page shows you how to calculate a running total down columns in an Explore's **Data** table. You can also create a running total across rows using table calculations, which you can read more about in the [Aggregating across rows (row totals) in table calculations](/looker/docs/best-practices/how-to-aggregate-values-across-rows) Best Practices page.\n\nUsing the `running_total()` function\n------------------------------------\n\n\nTo create a running total down a column using table calculations, you can use the [`running_total()`](/looker/docs/functions-and-operators#functions_for_table_calculations_only)\nfunction, which returns the running total of the values in a specified column.\n\n\nFor example, to create a running total of the column **Inventory Items Count** in the following Explore **Data** table that shows **Inventory Items Count** grouped by **Inventory Items Created Date**, you can create this table calculation: \n\n```\nrunning_total(${inventory_items.count})\n```\n\n\nThis expression yields the following results:"]]