Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |