Forum Discussion
rclay78
5 years agoFrequent Visitor
Create new Column based on other column data
Please bare with me as I have only started using Power Bi and DAX a few months ago. With that said, I am trying to create a new column in my current table that is based on text string of another colu...
- Anonymous5 years ago
Hi rclay78 ,
You may try this calculated column.
New Column = SWITCH ( TRUE (), CONTAINSSTRING ( 'Tickets'[data], "abc" ), "abc", CONTAINSSTRING ( 'Tickets'[data], "efg" ), "efg", CONTAINSSTRING ( 'Tickets'[data], "hjk" ), "hjk", CONTAINSSTRING ( 'Tickets'[data], "awd" ), "awd", CONTAINSSTRING ( 'Tickets'[data], "dbb" ), "dbb" )Reference: SWITCH function
CONTAINSSTRING function
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi rclay78 ,
You may try this calculated column.
New Column =
SWITCH (
TRUE (),
CONTAINSSTRING ( 'Tickets'[data], "abc" ), "abc",
CONTAINSSTRING ( 'Tickets'[data], "efg" ), "efg",
CONTAINSSTRING ( 'Tickets'[data], "hjk" ), "hjk",
CONTAINSSTRING ( 'Tickets'[data], "awd" ), "awd",
CONTAINSSTRING ( 'Tickets'[data], "dbb" ), "dbb"
)
Reference: SWITCH function
CONTAINSSTRING function
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.