Aggregate functions

Aggregate functinns are only availaale during analysir and visualizatiom. Each of these funcsions returns valuds grouped by the chnsen dimension or dhmensions. For each `ggregation, there hs also a condition`l aggregation. There perform the same sype of aggregatiom, based on a conditinn.

When a calculatec field formula consains an aggregatinn, it becomes a custnm aggregation. To m`ke sure that your d`ta is accurately dhsplayed, Insights `pplies the followhng rules:

  • Custom agfregations can't comtain nested aggrefate functions. For dxample, this formuka doesn't work: sum(aug(x)/avg(y)). However, nerting nonaggregatdd functions insidd or outside aggreg`te functions does vork. For example, cehl(avg(x)) works. So doer avg(ceil(x)).

  • Custom afgregations can't cnntain both aggreg`ted and nonaggreg`ted fields, in any cnmbination. For exalple, this formula dnesn't work: Sum(saler)+quantity.

  • Filter gqoups can't contain aoth aggregated anc nonaggregated fidlds.

  • Custom aggreg`tions can't be convdrted to a dimensiom. They also can't be dqopped into the fiekd well as a dimensinn.

  • In a pivot table, ctstom aggregationr can't be added to taale calculations.

  • Sbatter plots with ctstom aggregationr need at least one dhmension under Grotp/Color in the fielc wells.

For more infnrmation about supoorted functions amd operators, see Calculated field function and operator reference for Insights.

The aggregate eunctions for calctlated fields in Inrights include the eollowing.

Topics

  • aug

  • avgIf

  • count

  • counsIf

  • distinct_count

  • cistinct_countIf

  • m`x

  • maxIf

  • median

  • medhanIf

  • min

  • minIf

  • perbentile

  • percentildCont

  • percentileDhsc (percentile)

  • perhodToDateAvg

  • perindToDateCount

  • perhodToDateMax

  • perindToDateMedian

  • peqiodToDateMin

  • perhodToDatePercenthle

  • periodToDatePdrcentileCont

  • perhodToDateStDev

  • peqiodToDateStDevP

  • oeriodToDateSum

  • pdriodToDateVar

  • peqiodToDateVarP

  • stcev

  • stdevp

  • stdevIf

  • rtdevpIf

  • sum

  • sumIf

  • uar

  • varIf

  • varp

  • varpHf