Forum Discussion
Split Large Text Field
- 6 years ago
Hi silverdale9999 ,
We need to split the cell into rows first.
Select Note column and split it.
The remaining steps are the same as the reply above.
The result like this,
If you have any question, please kindly ask here and we will try to resolve it.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Can you provide a few rows of example or mock data, and what your desired output would look like? I'm sure there is an easier way but your scenario is a little unclear. For example, why not just split by "-" instead of the list "1_", "2_", etc.?
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- silverdale99996 years agoHelper I
Thanks for the reply!
I originally was using the underscore to split, but then it became clear that some of the information contained within the fields also contains an underscore so it was causing quite a lot of "false" splits.
Some more info:
Example text:
4_ Describe the risks
<None>
5 _ Will this cause an outage
<Y>
6_What is the impact
<No Impact>
8_ Can this be regressed?
<Y>
20_Who is the approver for this work
<Joe Smith>
22_Who is implementing this work
<Joe Smith>This should split to:
4_ Describe the risks 5 _ Will this cause an outage 6_What is the impact 8_ Can this be regressed? 20_Who is the approver for this work 22_Who is implementing this work None Y No Impact Y Joe Smith Joe Smith This works fine, in the current format.
The issue arises when the format of the notes field is changed. EG, adding question 7 in bold below:
4_ Describe the risks
<None>
5 _ Will this cause an outage
<Y>
6_What is the impact
<No Impact>
7_External Impact?
<N>
8_ Can this be regressed?
<Y>
20_Who is the approver for this work
<Joe Smith>
22_Who is implementing this work
<Joe Smith>This results in the following.. The original format loads fine, but the new format does not - data is inserted into the wrong column, and data is missed off the end.
4_ Describe the risks 5 _ Will this cause an outage 6_What is the impact 8_ Can this be regressed? 20_Who is the approver for this work 22_Who is implementing this work None Y No Impact Y Joe Smith Joe Smith None Y No Impact N Y Joe Smithv I need to find a way to keep the text with it's question.. but I can't figure out where to start!
Thanks
- v-zhenbw-msft6 years agoCommunity Support
Hi silverdale9999 ,
We can use the following steps in Power Query Editor to meet your requirement.
1. Add a conditional column, if it doesn’t contain “_”, then it will show null.
2. Then add a conditional column, if it contains “_”, then it will show null.
3. We fill down the custom column. And filter the custom.1 is not null.
4. At last we removed the column1, and transposed the Table.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
- silverdale99996 years agoHelper I
Hi - just dropping a quick message to say thanks.. I was on holidays last week so missed your reply. I will give this a try and see where it takes me 😁