Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm tryting to format:
tim_cook_apple.com ==> tim_cook@apple.com
Background
a ShareGate data report displays all external accounts in SPO as "i:0#.f|membership|tim_cook_apple.com#ext#@apple.onmicrosoft.com", which I am trying to extract the user Email from.
After some transforming I got the string to trim into "tim_cook_apple.com".
I am trying to reference the first underscore from the right and then use the substitute function to replace the underscore with @. However the search, find functions always targets the first instance from the left. How can I reference the first instance fo the underscore from the right?
Thank you
Solved! Go to Solution.
@IMCODEV Try this:
New Column =
VAR __Num = LEN([Column]) - LEN(SUBSTITUTE([Column],"_",""))
RETURN
SUBSTITUTE([Column],"_","@",__Num)
@IMCODEV Try this:
New Column =
VAR __Num = LEN([Column]) - LEN(SUBSTITUTE([Column],"_",""))
RETURN
SUBSTITUTE([Column],"_","@",__Num)
The error was caused from entries that were not in Email format. Therefore the entries had no underscore which resulted in a 0 value being returned for the _num value. As a workaround, I just created another column using the subsitiution function to swap the 0 for a valid value of 1. Afterwards, the formula which @Greg_Deckler worked and I achieved my goal.
Thank you
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
91 | |
87 | |
47 | |
28 | |
22 |