--- title: "zscore" slug: "zscore" updated: 2023-03-21T11:36:43Z published: 2023-03-21T11:36:43Z canonical: "docs.datajet.app/zscore" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # zscore ### Returns the Z-score for the current row and result set ### Purpose Use this function to: - Measure the distance of the observation from the average - Calculate the standardized distance from the mean ### Calculation ## ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679397946341.png) ![](blob:https://datajetsoftware.atlassian.net/1e625c8d-1bee-467d-83ee-28c693867f1d#media-blob-url=true&id=f3473089-9dc4-4810-b422-95928b8c2b86&collection=contentId-491225120&contextId=491225120&height=86&width=201&alt=) z = standard score x = observed value (RowX) μ = mean of population σ = standard deviation of the population *where* *![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679397961923.png)* ![](blob:https://datajetsoftware.atlassian.net/defd2d02-6173-447a-b161-46eb2ddbda5a#media-blob-url=true&id=b8b5c3b2-07b1-4c24-a878-96d40fe67ab6&collection=contentId-491225120&contextId=491225120&height=122&width=306&alt=) μ = Sum(RowN:Row0) / N N = number of rows in result set ### Sample Result ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679397977472.png) ### Parameters | Parameter | Description | | --- | --- | | Dimensions | Discrete field(s). All fields must come from the same table. | | Name | Name to be displayed as Column Header in result grid | | Measure | The field to be used in the post-function calculation. - Must be numeric if Function is anything other than COUNT. - Must come from same table as DIMENSIONS. - Supports Discrete or Continuous DataTypes. | | Function | COUNT / SUM / AVG / MIN / MAX / STDEV | | Post | zscore | | Value | Optional. Filter to apply when evaluating FUNCTION. Only records in the Filter Recordset will be included in the Function and Post-Function calculations. Must come from same table as DIMENSION/MEASURE or be linked to the Dimension table. | | Axis | 0 / 1. Y-Axis to use when plotting graph. Default = 0 | | Plot | Y / N. Specifies whether measure’s output column should be plotted on graph. Default = Y | | Resolve | Optional. Resolve level for the measure. If blank, Resolve = Dimension Table | | Series Type | Default / Bar / Stacked Bar / Line / Spline / RangeLow / RangeHigh / CSLow / CSHigh / CSOpen / CSClose Determines the graph style for the measure. | | Popup | Default / None / Extended | | Prefix | $ / £ / E / % | ### Usage Notes A Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of [standard deviations](https://www.investopedia.com/terms/s/standarddeviation.asp) from the mean. If a Z-score is 0, it indicates that the data point's score is identical to the mean score. A Z-score of 1.0 would indicate a value that is one standard deviation from the mean. Z-scores may be positive or negative, with a positive value indicating the score is above the mean and a negative score indicating it is below the mean. ### ## Example - Example use: calculating the standardized distance from the mean ## NOTE: Measure 1 is included purely for illustration. It is not necessary to include this measure for the calculation to work. #### Dimension:[transactions].[date] #### Measure 1 - Name: = sum sales - Measure:  = transactions.castprice - Function: = sum - Post: = - Value: = - Axis: =0 - Plot:=Y - Resolve:= - Series Type:=Default - Popup:=Default - Prefix:= #### Measure 2 - Name: = z score - Measure:  = transactions.castprice - Function: = sum - Post: = zscore - Value: = - Axis: =0 - Plot:=Y - Resolve:= - Series Type:=Default - Popup:=Default - Prefix:= #### Options - Row Count = 30 - Sort Order: [Ascending Label] ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679398481381.png) ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679398491103.png) ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1679398502794.png)