Forum Discussion
hermanos
3 years agoFrequent Visitor
Split Text After Second Value with Dax
Hi guys, I have a sample dataset which contains mail adresses of our users. For example; car@[email protected] ships@[email protected] [email protected] [email protected] If I have "car" in my e-mail address...
AlB
Community Champion
3 years agoHi hermanos
Try this
NewColumn =
SWITCH (
TRUE (),
SEARCH ( "ships", TableName[Address] ) >= 1,
LEFT ( TableName[Address],
FIND ( "@", TableName[Address], SEARCH ( "@", TableName[Address] ) + 1 ) - 1
),
SEARCH ( "cars", TableName[Address] ) >= 1,
LEFT ( TableName[Address], SEARCH ( "@", TableName[Address] ) - 1 ),
TableName[Address]
)
hermanos
3 years agoFrequent Visitor
It throws me an error.
"The search Text provided to function 'SEARCH' could not be found in the given text."