View the original community article here
Last tested: May 7, 2020
The Problem
Users will sometimes want to get a substring of their dimension, for example, extracting first.last from first.last@gmail.com
A Solution
We can pretty easily do this with a table calc. We can either use 2 columns or combine them.
- Create a "position" column to get the length of the string before the value we want. For emails this will be @.
Position:
position(${users.email}, "@") - Then, we create the substring table calc;
Name:
substring(${users.email},0,${position}-1) - The above 2 steps will extract the names, if you would like to combine those into a single column it would look like:
Name:
substring(${users.email},0, position(${users.email}, "@")-1)
This content is subject to limited support.