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

When working with a numeric variable in a dataset, we typically do not use its values directly. Instead, we group values into segments based on the needs of the analysis. Since it is not always possible to anticipate all required segments in advance, we add a feature that allows for the fast creation of segments directly in Data Visualization Interface (DVI).

How to create segments for numeric variables in DVI

  1. Select a numeric variable from a variable tree to evoke 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. You can either type a custom expression or choose and edit a suggested one from the hint.

  4. Press Enter to apply the expression and generate the specified intervals. Once Intervals are created, you can operate with them just like you would with regular categories.

  5. Double-click on any created segment to rename it for clarity.

  6. To remove existing segments, select them and press the 'X' icon next to them. Deleting intervals will not impact existing reports.

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

The creation or deletion of intervals does not affect the original 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 the segmentation expression

The expressions for segmentation 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?