Forum Discussion
How to split strings by a delimiter?
- Anonymous5 years ago
Hi Anonymous
You can use Split Column in Query Editor .Enter “-” to split value .
The effect is as shown:
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
"Hence, power Query is not available for this table created" - Do the union in Power Query. Do the split in Power Query.
Is it possible in DAX? yes, you would create a new column using LEFT, FIND etc then do it again to create another column but it's a lot simpler in Power Query.
- Anonymous5 years agoNot applicable
I have used the following DAX:
LEFT( 'All Data'[Campaign name],
FIND("-", 'All Data'[Campaign name],1,
LEN('All Data'[Campaign name])))With regards, London_Car-Blue-March_2021 as campaign name example:
For the first split column I am getting London_Car
However, when try to split the value for the second position (2), I am still getting the same string value shown in the first column: London_Car and not Blue. And same issue for the third split column.
Is there something I am doin wrong?
I just want to split the string each time there is the character "-" based on its position.