

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 彙總函數
<a name="calculated-field-aggregations"></a>

彙總函數只能在分析和視覺化期間使用。這些函數會傳回依照所選擇的一或多個維度分組的值。每一種彙總計算另提供了有條件彙總。其將根據條件執行同一類型的彙總。

計算欄位公式包含彙總時，會變成自訂彙總。為了確保您的資料準確顯示，Amazon Quick 會套用下列規則：
+ 自訂彙總不可包含巢狀彙總函數。例如，下列公式無作用：`sum(avg(x)/avg(y))`。不過，彙總函數內部或外部的巢狀非彙總函數會發揮作用。例如，`ceil(avg(x))` 有作用。`avg(ceil(x))` 也會發揮作用。
+ 自訂彙總不可同時包含彙總和非匯總欄位的任何組合。例如，下列公式無作用：`Sum(sales)+quantity`。
+ 篩選條件群組不可同時包含彙總和非彙總欄位。
+ 自訂彙總不可轉換到維度。這些也無法放入欄位和維度。
+ 在樞紐分析表中，不可將自訂彙總新增到表格計算。
+ 自訂彙總的散佈圖至少需要欄位集的 **Group/Color (群組/色彩)** 底下的至少一個維度。

如需支援函數和運算子的詳細資訊，請參閱 [Amazon Quick 的計算欄位函數和運算子參考](https://docs.aws.amazon.com/quicksight/latest/user/calculated-field-reference.html)。

Quick 中計算欄位的彙總函數包括下列項目。

**Topics**
+ [avg](avg-function.md)
+ [avgIf](avgIf-function.md)
+ [count](count-function.md)
+ [countIf](countIf-function.md)
+ [distinct\_count](distinct_count-function.md)
+ [distinct\_countIf](distinct_countIf-function.md)
+ [max](max-function.md)
+ [maxIf](maxIf-function.md)
+ [median](median-function.md)
+ [medianIf](medianIf-function.md)
+ [min](min-function.md)
+ [minIf](minIf-function.md)
+ [percentile](percentile-function.md)
+ [percentileCont](percentileCont-function.md)
+ [percentileDisc (百分位數)](percentileDisc-function.md)
+ [periodToDateAvg](periodToDateAvg-function.md)
+ [periodToDateCount](periodToDateCount-function.md)
+ [periodToDateMax](periodToDateMax-function.md)
+ [periodToDateMedian](periodToDateMedian-function.md)
+ [periodToDateMin](periodToDateMin-function.md)
+ [periodToDatePercentile](periodToDatePercentile-function.md)
+ [periodToDatePercentileCont](periodToDatePercentileCont-function.md)
+ [periodToDateStDev](periodToDateStDev-function.md)
+ [periodToDateStDevP](periodToDateStDevP-function.md)
+ [periodToDateSum](periodToDateSum-function.md)
+ [periodToDateVar](periodToDateVar-function.md)
+ [periodToDateVarP](periodToDateVarP-function.md)
+ [stdev](stdev-function.md)
+ [stdevp](stdevp-function.md)
+ [stdevIf](stdevIf-function.md)
+ [stdevpIf](stdevpIf-function.md)
+ [sum](sum-function.md)
+ [sumIf](sumIf-function.md)
+ [var](var-function.md)
+ [varIf](varIf-function.md)
+ [varp](varp-function.md)
+ [varpIf](varpIf-function.md)