Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
99 | |
86 | |
78 | |
75 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |