Forum Discussion
Anonymous
9 years agoNot applicable
Switch function - with a wild card or without exact expression
Hi Community I am working on an experession, where I am using a switch - True function. Basically I have various columns with string values and I am trying to create a new column based upon values...
- 9 years ago
Hi Anonymous,
Function "Search" could help in your scenario. Please have a try.
custom Column = SWITCH ( TRUE (), OR ( 'Table3'[Col1] = "Organic Search", 'Table3'[Col2] = "google.com.au" ), "search", 'Table3'[Col2] = "Facebook.com", "social", SEARCH ( "test", 'Table3'[Col3], 1, 0 ) > 0, "myresults" )Best Regards!
Dale
v-jiascu-msft
Microsoft Employee
9 years agoHi Anonymous,
Function "Search" could help in your scenario. Please have a try.
custom Column =
SWITCH (
TRUE (),
OR ( 'Table3'[Col1] = "Organic Search", 'Table3'[Col2] = "google.com.au" ), "search",
'Table3'[Col2] = "Facebook.com", "social",
SEARCH ( "test", 'Table3'[Col3], 1, 0 ) > 0, "myresults"
)
Best Regards!
Dale
Anonymous
8 years agoNot applicable
Nicely done. In essence allows us to do a "like" within a switch statement.
Just what I needed.
Jonathan