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.
Hi Community!
I am struggling with an issue that seems to be very straight forward.
I want to only keep the domain of an e-mail address. As I do not have access to the source, I need it to be a dax measure.
This is what I want to achieve:
John.Doe@powerbi.com -> powerbi
JaneDoe@computer.com -> computer
Please note that some e-mail addresses have following format (in case it might be relevant):
John.Doe@us.powerbi.com -> us.powerbi
Thank you in advance!
Solved! Go to Solution.
Hi @Rocketcity45 ,
You can create a measure as below to get it:
Domain name =
VAR _selemail =
SELECTEDVALUE ( 'Table'[e-mail addresses] )
VAR _aposition =
SEARCH ( "@", _selemail, 1, 0 )
VAR _composition =
SEARCH ( ".com", _selemail, 1, 0 )
RETURN
MID ( _selemail, _aposition + 1, _composition - _aposition - 1 )
Best Regards
@Rocketcity45 , Power query text between delimiter @ and .
Hi Amitchandak!
Thank you for your reply - I've tried this but unfortunately it does not work as I get this message:
Therefore, I was thinking of a dax measure...
Hi @Rocketcity45 ,
You can create a measure as below to get it:
Domain name =
VAR _selemail =
SELECTEDVALUE ( 'Table'[e-mail addresses] )
VAR _aposition =
SEARCH ( "@", _selemail, 1, 0 )
VAR _composition =
SEARCH ( ".com", _selemail, 1, 0 )
RETURN
MID ( _selemail, _aposition + 1, _composition - _aposition - 1 )
Best Regards
Thank you! This worked. 🙂
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |