# Skew - script function

Skew() returns the skewness of expression over a number of records as defined by a group by clause.

Syntax:

Skew([ distinct] expr)

Return data type: numeric

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| expr | The expression or field containing the data to be measured. |
| DISTINCT | If the word distinct<br>occurs before the expression, all duplicates will be disregarded. |

Examples and results:

Add the example script to your app and run it. Then build a straight table with ` Type  `and MySkew as dimensions.

Resulting data

| 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>```<br><br>`Skew1:``LOAD Type,``  Skew(Value) as MySkew ``Resident Table1 Group By Type;<br>`` ` | The results of the Skew() calculation are:<br><br><ul> <li> <code>Type </code>		is <code>MySkew</code></li> <li> <code>Comparison	</code> is <span>0.86414768</span></li> <li> <code>Observation	</code>is <span>0.32625351</span></li> </ul> |