Skip to content

RIGHT

The RIGHT function returns a specified number of characters from the right side of a text string.

Applicable to

Calculated Columns

Return Value

  • The RIGHT function returns a text string containing the specified number of characters from the right side of the input text.
  • If the number character is greater than the length of text, the entire text string is returned.

Remark

  • The RIGHT function is useful for extracting a substring from the beginning of a text string.
  • If number character is less than 1, the function returns an empty string.
  • If the value is a NULL value, the function returns NULL.

Syntax

RIGHT(<expression>,number)

RIGHT in Calculated Columns

ParameterDescription
ExpressionA placeholder in a function that is replaced with the actual column name.
Column NameThe name of the column in the dataset or Datasource that contains the values you want to analyze.
numberNumber of characters you want to extract from the left side of the string.

Steps to Use

  1. Write the RIGHT function. For instance RIGHT(<expression>,number)
  2. Replace <expression> with VALUE([Column Name]) and replace number with the number of characters you want to extract position of.Replace the Column Name with the actual name of your column required.
  3. To learn how to add calculated columns in Infoveave, visit the section Calculated Columns.

Example

Objective Consider that you have the below sales dataset, your goal is extracting the first 2 substrings in CATEGORY from right.

ORDER DATECOUNTRYCATEGORYUNIT PRICEMARKET PRICEQUANTITY
2024-01-03BrazilBaby Food38.4143.78742
2024-01-07JapanSpices45.5650.815520
Japan43.787410
2024-01-1832.30194
2024-01-22BrazilCosmetics28.33523.01097
2024-01-26Canada20.18523.01099
2024-01-04FranceCereal25.2628.79649
2024-01-09BrazilCereal44.57550.81558
2024-01-14BrazilSnacks20.1854
BrazilCosmetics40.48546.15292

You can use the RIGHT function like

RIGHT(VALUE([CATEGORY]), 2)

The new calculated column “Text” will return

ORDER DATECOUNTRYCATEGORYUNIT PRICEMARKET PRICEQUANTITYTEXT
03-01-2024BrazilBaby Food38.4143.78742od
07-01-2024JapanSpices45.5650.815520es
Japan43.787410
18-01-202432.30194
22-01-2024BrazilCosmetics28.33523.01097cs
26-01-2024Canada20.18523.01099
04-01-2024FranceCereal25.2628.79649al
09-01-2024BrazilCereal44.57550.81558al
14-01-2024BrazilSnacks20.1854ks
BrazilCosmetics40.48546.15292cs