Forum Discussion
How do I duplicate rows based on cell contents (cell contains semi-colon seperated data)?
- 9 years ago
HI h0ttamale,
This could be done by Query Editor (M Language) as below steps:
- Click Edit Queries
- In Query Editor, Choose Add Column tab -> Choose Custom Column
- Name for new column: NewContact with formula: Text.Split([Contact],";")
- In the top right of NewContact column, choose Expand to new rows
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen
HI h0ttamale,
This could be done by Query Editor (M Language) as below steps:
- Click Edit Queries
- In Query Editor, Choose Add Column tab -> Choose Custom Column
- Name for new column: NewContact with formula: Text.Split([Contact],";")
- In the top right of NewContact column, choose Expand to new rows
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen
- h0ttamale9 years agoFrequent Visitor
Awesome! Thanks! Works perfectly.
- Anonymous3 years agoNot applicable
what if your reference cell contains numeric value, and that numeric value shoud be the times it needs to be replicated? Lets say, my cell value for the row is 5, then I want to have 5 copies of that rows. Thanks!
- Anonymous2 years agoNot applicable
then you should add a Custom Column with a formula:
List.Repeat({[your reference cell]},[your reference cell])
and then in the top right of your new Custom Column choose Expand to new rows