Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menampilkan hasil penjumlahan semua nilai dalam sekumpulan angka.
Contoh penggunaan
SUM(Quantity Sold)
Sintaks
SUM(X)
Parameter
X - Kolom atau ekspresi angka.
Catatan
X tidak boleh berupa kolom teragregasi atau hasil dari fungsi agregasi.
Contoh
Perhatikan contoh berikut. Sumber data berisi kolom yang disebut "Jumlah Terjual" dengan jumlah item yang terjual per pembelian. Gunakan fungsi SUM untuk menghitung jumlah nilai ini.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-31 UTC."],[],[],null,["# SUM\n\nReturns the sum of all values in a set of numbers.\n\nSample usage\n------------\n\n`SUM(Quantity Sold)`\n\nSyntax\n------\n\n`SUM(`\u003cvar translate=\"no\"\u003eX\u003c/var\u003e`)`\n\n### Parameters\n\n- \u003cvar translate=\"no\"\u003eX\u003c/var\u003e - A numeric field or expression.\n\n### Notes\n\n- \u003cvar translate=\"no\"\u003eX\u003c/var\u003e cannot be an aggregated field or the result of an aggregation function.\n\nExample\n-------\n\nConsider the following example. The data source contains a field called \"Quantity Sold\" with the number of items sold per purchase. Use the `SUM` function to compute the sum of these values.\n\nRelated resources\n-----------------\n\n- [Calculated fields](/looker/docs/studio/about-calculated-fields)\n- [Looker Studio function list](/looker/docs/studio/function-list)"]]