Skip to main content
All CollectionsCrosstab and Data AnalysisTips
Segmentation of Numeric variables
Segmentation of Numeric variables
Updated over a year ago

Having a numeric variable in a dataset we usually do not operate with its values directly, instead, we organize values into groups (segments) we need for our purposes. It is not always possible to foresee all that is needed for the analysis segments, so we found it useful to enable the feature for the fast creation of segments directly in Data Explorer.

How to create segments for numeric variables in Data Explorer (DeX)

  1. Choose any numeric variable from a list of variables in the left panel in DeX to activate the secondary panel, which may be empty or display previously created segments.

  2. To create new intervals, click on the input field at the top of the secondary panel.

  3. A hint displaying common expressions will appear. You can either type an expression or choose and edit any suggested in the hint.

  4. Press Enter to apply the expression and generate the specified intervals. Remember that you can edit each interval's label by double-clicking on the created segment individually.

Ready-to-use prompts for segmentation of numeric variables

Once you have created your new segments, you can rename them to make more meaningful labels. eg. weight 10-99 g for ‘Small’ fruits, weight 300-399 g for ‘Heavy’ fruits. Afterward, you can operate with them just like you would with regular categories.

You can create any number of segments without restrictions, allowing any duplication or overlapping that might be needed.

To remove existing segments

  1. Select the segments

  2. Click the 'x' icon next to them or press the Delete key on your keyboard.

Note! Deleting intervals from the list will not impact existing reports.

Note! The creation or deletion of intervals does not affect other users or alter the variable. These intervals are exclusive to your account within this specific database and will not interfere with other users or databases.

To create permanent segments for all database users, consider creating a logical variable in Meta-editor.

You can create breaks for date variables in the same way

Syntax of Segmenting Expression

Note! All the expressions described in this section are case insensitive.

To define the segment you need to enter an expression which can be:

  • Single value as it is (18, 44, 1947 etc.) defines options strictly matched to the number.

  • Expressions 'more or less' (>=17, >99, <=87 etc.) accordingly selects the options that match the condition.

  • An interval defined by formula FROM:TO (18:77, 4:15 etc.) includes borders.

  • Intervals with explicitly defined closures: square brackets define included borders, round brackets define excluded borders. Examples: [18:25] - from 18 to 25 borders included ie.18-25; (18:25) - from 18 to 25 borders excluded ie. 19-24; [18:25) - from 18 to 25 excluding 25 ie. 18-24.

  • By using * asterisk we define the full span from min to max value.

  • The expression ‘from [N1] by [N2]*[N3]’ creates N3 non-intersecting intervals of span N2, starting from N1. Numbers in brackets are variable and optional. Example: 'from 38 by 5*6' creates six non-intersecting intervals, each includes five values: 38-42, 43-47, 48-52, 53-57, 58-62, 63-67.

  • The expression ‘from [N1] by [N2]*' creates intervals of span N2 for the full range starting from N1. Similar to the previous one without a specified number of intervals.


Did this answer your question?