Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello Community,
i'm trying to build an email from a colmun with full names. Right now i'm using substitute to replace all blank spaces with a dot and then i add the domain name. But since there are people working here with three names i need to add a underscore before the third name, like this: john.donothan_wayne@outlook.com. Is there any way to iterate through the string or any other ways yoou can suggest?
Thank you!
Solved! Go to Solution.
You can use a third argument in SUBSTITUE to dictate the occurance that you want to substitue =SUBSTITUTE([name]," ","_",2)
I'd use a switch that checks the number of time a space occurs LEN([name])-LEN(SUBSTITUTE([name]," ","")) then have a result for 1 space or 2.
Alternatively I'd build a custom column in the query editor that splits on the spaces in the names, split on space then concatenate them together with 2 custom columns will probably be the easiest way to do it, might not be the most efficient though.
You can use a third argument in SUBSTITUE to dictate the occurance that you want to substitue =SUBSTITUTE([name]," ","_",2)
I'd use a switch that checks the number of time a space occurs LEN([name])-LEN(SUBSTITUTE([name]," ","")) then have a result for 1 space or 2.
Oh wow that was more easy then i thought, i used the Substitute solution with the second argument and that fullfills my needs. Thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |