distinct function in the Factory
The distinct function returns the number of distinct values of the column, evaluated within groups defined by the group parameter if required.
You can use this function in case you need to fill an attribute with the number of distinct values of another one.
It is possible to visualize the number of distinct values of nominal attributes also by selecting the attribute and reading the result in the Info panel of the Data Manager task.
Function and parameters
distinct(column, group,usemissing)
Parameter  Description 

column  It identifies the column to which you want to apply the formula. The column parameter is mandatory. 
group  It allows you to group the results by a certain column. 
usemissing  Flag used to define if missing values have to be considered or not in distinct values. Default is False. 
Example
The following example uses the HR employee attrition dataset.
Description  Screenshot 

 
