0
votes

I have a SSAS Tabular Cube an I am getting data from a underlying Database.

I have a table Employee with columns: Job Title EmployeeID (Some numeric ID) Email Address Full Name Department

I have email address like this Data in column - [email protected] (just example)

Want to extract - kunalshukla and clear @yahoo.com

I want a DAX formula which is simple to do this task

2

2 Answers

0
votes

This worked just fine for me without the ?:

= LEFT(Employee[Email Address], FIND("@", Employee[Email Address],,1) - 1)

This does too:

= LEFT(Employee[Email Address], SEARCH("?@", Employee[Email Address],,BLANK()))

I recommend leaving out the yahoo.com part so it doesn't break if you happen to have a different domain.

0
votes

I tried and was able to get the expected result using below formula in DAX Tabular Model (SSAS)

=MID(Employee[Email Address],1,SEARCH("[email protected]",Employee[Email Address],,BLANK()))

  • Here I am using "?" as wildcard search without that it will give error as:

"An argument of the MID has the wrong data type or has an invalid data value"

Also note that SEARCH, FIND functions are unable to find the special character "@" if given without a "?" before it.

Let me know if you find this helpful