PICKZEN
Search
⌃K

PERSONALITY

The PERSONALITY function allows implementing generic personality test algorithms based on a questionnaire where points are assigned to answers.

Details

After all answers are evaluated, it will return a group with an entry for each group with its calculated numeric.

Syntax

PERSONALITY(table, reducer)
Argument name
Description
table
Required
Table to evaluate with answers groups and points.
reducer
Required
Mathematical operation to calculate a final numeric result for each group:
avg Average of the points of each group.
count Number of matching answers of each group.
sum Sum of the points of each group.
max Maximum answer points of each group.
min Minimum answer points of each group.

Examples

mytable
Inputs: a is true, c is true, and d is true.
  • PERSONALITY(mytable, 'avg') will return {g1:1, g2:3}
  • PERSONALITY(mytable, 'count') will return {g1:1, g2:2}
  • PERSONALITY(mytable, 'sum') will return {g1:1, g2:6}
  • PERSONALITY(mytable, 'max') will return {g1:1, g2:4}
  • PERSONALITY(mytable, 'min') will return {g1:1, g2:2}
Last modified 2yr ago