Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
May I know is there any way I could split text before multiple Delimiters in one function?
Original Column | Desired Result |
1 & 5 | 1 |
50 - 1000 | 50 |
1000/2000 | 1000 |
2000&5000 | 2000 |
5000/10000 | 5000 |
Great thanks!
Solved! Go to Solution.
Add a step to extract the text before one of those delimiters, and then modify the code in the formula bar to look like this
= Table.TransformColumns(Source, {{"Column1", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-"})), type text}})
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Add a step to extract the text before one of those delimiters, and then modify the code in the formula bar to look like this
= Table.TransformColumns(Source, {{"Column1", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-"})), type text}})
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
In case other people struggle with changing the 'text before delimiter' line into TransformColumns, like I did, here is some clarification:
= Table.TransformColumns(#"NameOfPreviousQueryStep", {{"Original column you want to edit", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-", "any other symbols"})), type text}})
So don't expect to create a new column!
Two follow-on questions:
Thank you,
-Travis
how can this be done with a multiple character string?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
28 | |
27 | |
23 | |
14 | |
10 |
User | Count |
---|---|
24 | |
21 | |
17 | |
11 | |
9 |