# Skew - chart function

Skew() returns the aggregated skewness of the expression or field iterated over the chart dimensions.

Syntax:

Skew([{SetExpression}] [DISTINCT] [TOTAL [&lt;fld{, fld}&gt;]] expr)

Return data type: numeric

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| expr | The expression or field containing the data to be measured. |
| SetExpression | By default, the aggregation function<br>will aggregate over the set of possible records defined by the selection.<br>An alternative set of records can be defined by a set analysis<br>expression. |
| DISTINCT | If the word<br>DISTINCT occurs before the function<br>arguments, duplicates resulting from the evaluation of the function arguments are disregarded. |
| TOTAL | If the word<br>TOTAL occurs before the function<br>arguments, the calculation is made over all possible values given<br>the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions.<br><br>By using TOTAL [&lt;fld {.fld}&gt;], where the TOTAL qualifier is followed by a list of one or more field names as a subset of the chart dimension variables, you create a subset of the total possible values.<br><br>[Defining the aggregation scope](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/define-aggregation-scope.htm) |

Limitations:

The parameter of the aggregation function must not contain other aggregation functions, unless these inner aggregations contain the TOTAL qualifier. For more advanced nested aggregations, use the advanced function Aggr, in combination with a specified dimension.

Examples and results:

Add the example script to your app and run it. Then build a straight table with ` Type  `as dimension and `Skew(Value)` as measure.

`Totals` should be enabled in the properties of the table.

| Example | Result |
| --- | --- |
| ```<br>Table1:<br>Crosstable (Type, Value)<br>Load recno() as ID, * inline [<br>Observation\|Comparison<br>35\|2<br>40\|27<br>12\|38<br>15\|31<br>21\|1<br>14\|19<br>46\|1<br>10\|34<br>28\|3<br>48\|1<br>16\|2<br>30\|3<br>32\|2<br>48\|1<br>31\|2<br>22\|1<br>12\|3<br>39\|29<br>19\|37<br>25\|2 ] (delimiter is '\|');<br>``` | The results of the Skew(Value) calculation are:<br><br><ul> <li> <code>Total</code>		is <span>0.23522195</span></li> <li> <code>Comparison	</code> is <span>0.86414768</span></li> <li> <code>Observation	</code>is <span>0.32625351</span></li> </ul> |

## Learn more

* [Avg - chart function](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalAggregationFunctionsinCharts/avg.htm)
* [Set analysis](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-analysis-expressions.htm)