Die power-Funktion wertet eine base aus, indem sie mit einer bestimmten exponent potenziert wird.
Beispiele
Mit der Funktion power können Sie eine Zahl mit einer anderen potenzieren. 23 würde beispielsweise so geschrieben:
power(2, 3)
Normalerweise wird die Funktion power mit einem Feldbezug oder einem Ausdruck verwendet.
Beispiel:
power(${order_item.standard_deviation_profit},2)
Wichtige Informationen
Mit der Funktion power können Sie auch die n-te Wurzel einer Zahl berechnen, indem Sie 1/n als exponent verwenden. Die Kubikwurzel (die dritte Wurzel) von 7 würde beispielsweise so aussehen:
power(7, 1/3)
Für die Quadratwurzel (die 2. Wurzel) verwenden Sie einfach die Funktion sqrt.
[[["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-08-25 (UTC)."],[],[],null,["# power\n\nThe `power` function can be used in [custom filters](/looker/docs/filtering-and-limiting#custom-filters) and [table calculations](/looker/docs/table-calculations) to raise a number to the power of a given exponent.\n\nSyntax\n------\n\n**`power(base, exponent)`**\n\nThe `power` function evaluates a `base` by raising it to the power of a given `exponent`.\n\nExamples\n--------\n\nThe `power` function can be used to raise a number to the power of another number. For example, 2^3^ would be written as: \n\n power(2, 3)\n\nTypically, the `power` function is used with a field reference or an expression.\nFor example: \n\n power(${order_item.standard_deviation_profit}, 2)\n\nThings to know\n--------------\n\nThe `power` function can also be used to take the nth root of a number by using 1/n as the `exponent`. For example, the cube root (the 3rd root) of 7 would be: \n\n power(7, 1/3)\n\nFor a square root (the 2nd root) just use the `sqrt` function."]]