Binning functions
Binning is a way to group a number of more or less continuous values into a smaller number of "bins".
| Function | Description | 
|---|---|
AutoBinNumeric 
			  
				 |  
				Attempts to group the values in the
			 specified column into the defined number of bins. However, there may be more or
			 less bins than the defined number because the method will always result in bins
			 with limits that are easy to read (with as even numbers as possible). 
			  The first argument is the column to bin and the second argument is the number of bins to aim for. 
 Example: 
  |  
		
BinByDateTime 
				 |  
				Groups the values into bins based on a
			 natural date, datetime or time hierarchy. 
			  The first argument is the 
				 If you write a custom expression based on a 
				 
 Valid arguments for Arg2 are combinations of: ' ' ' ' ' ' ' ' ' ' ' Alternatively, Arg2 can also be a combination of: ' ' Examples: 
 For a date column called Order Date, the expression above would result in the column selector and hierarchy slider shown below, when used in a custom expression:  
				 Pruning level 0 would set the slider handle to the "year" position, 1 would mean the quarter, 2 the month, and 3 the day. 
 To use binning according to ISO 8601 for a date column, use
				the 
				  |  
		
BinByEvenDistance 
				 |  
				Groups the values in the specified column so
			 there is an even distance between all bins. 
			  The first argument is the column to bin and the second is the interval length. The third (optional) argument specifies where to start counting. If no start argument is specified, the first bin starts at zero. 
 Examples: 
 
  |  
		
BinByEvenDistribution 
				 |  
				Groups the values in the specified column so
			 that each bin (group) has the same number of unique values as the others. The
			 last bin may have more unique values than the others. 
			  The first argument is the column to bin and the second argument is the number of bins. Invalid values will give an invalid result. 
 Example: 
 
  |  
		
BinByEvenIntervals 
			  
				 |  
				Groups the values in the specified column so
			 that the value range is divided into equal intervals. The first argument is the
			 column to bin and the second argument is the number of bins. 
			  
 Example: 
  |  
		
BinBySpecificLimits 
			  
				 |  
				Groups the values in the specified column by
			 defined limits for the bins (groups). The first argument is the column to bin
			 and the following arguments are the limits for the bins. All rows which have
			 values larger than the largest limit will have the same bin value. Invalid
			 values will give an invalid result. 
			  
 Example: 
  |  
		
BinByStdDev 
				 |  
				Groups the values into different bins
			 depending on the values' distance from the mean, measured in standard
			 deviations. The first argument is the column to bin and the following arguments
			 are the number of standard deviations to show from the mean. The standard
			 deviation arguments should be given in ascending order and all values should be
			 positive. 
			  
 Example: 
 This will create a binning for: ≤ -1 standard deviation -1 standard deviation -0.5 standard deviation 0.5 standard deviation 1 standard deviation > 1 standard deviation  |  
		
BinBySubstring 
				 |  
				Groups the values into bins based on the
			 beginning or end characters of the value. This means that you can use this
			 method to group all values beginning with "A" into one bin, "B" into another,
			 etc. 
			  The first argument is the 
				 
 Examples: 
 
 
  |  
		
BinByTimeSpan 
				 |  
				Groups the values into bins based on a time
			 span. 
			  The first argument is the 
				 Valid arguments for Arg2 are combinations of: ' ' ' ' ' Example: 
 For a 
				 
  |  
		
FiscalBinByDateTime 
				 |  
				Groups the values into bins based on a
			 natural date or datetime hierarchy, with the levels shifted the specified
			 number of months. 
			  The first argument is the 
				 If no fourth argument is specified then the value of the
				document property 
				 
 Examples: 
 
  |  
		
See also Functions.
Example
Consider a column with the following values:
 
		
If the column is binned using the binning methods below, the resulting limits are as follows:
| Binning method | Result | 
|---|---|
AutoBinNumeric([Column],5)
				
			  |  
			 ![]()  |  
				
BinByEvenDistance([Column],5) 
			  |  
			 ![]()  |  
				
BinByEvenDistribution([Column],5) 
			  |  
			 ![]()  |  
				
BinByEvenIntervals([Column],5) 
			  |  
			 ![]()  |  
				
BinBySpecificLimits([Column],-2,4,10,16,22) 
			  |  
			 ![]()  |  
				
 
			 
 
			 



