Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am working on PowerQuery.
May I ask how I could extract the data from ( ) only if there is a ( )
Example | Desired result |
Tom | Tom |
1(Peter) | Peter |
David | David |
Oscar | Oscar |
2(Alex) | Alex |
Many thanks!
Solved! Go to Solution.
Hi, @Anonymous
Please try the following methods. Use Split Column twice in Power query. first split with "(" and second split with ")".
The results are shown in the figure.
Then add a custom column.
if[Example.2.1]<>null then [Example.2.1] else [Example.1]
You will get the results you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Please try the following methods. Use Split Column twice in Power query. first split with "(" and second split with ")".
The results are shown in the figure.
Then add a custom column.
if[Example.2.1]<>null then [Example.2.1] else [Example.1]
You will get the results you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try the "column from example" feature, it's pretty good at figuring things out:
https://docs.microsoft.com/en-us/power-query/column-from-example
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |