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.
How do I duplicate rows based on the content of Column B. I'd like a separate row for each "Person" in the cell?
This is my starting table (I can't extract the data in any other way):
This is my goal:
I'm new to BI but familiar with databases. Does it make more sense to "text to columns" then do a join?
Please help and thank you!
Solved! Go to Solution.
HI @h0ttamale,
This could be done by Query Editor (M Language) as below steps:
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen
Hello, I have the same problem with a dataset that has multiple countries(e.g US, UK, Mexico, Canada) in a cell that is supposed to have just one country(e.g US ) in the cell under 'Country' column. I followed the steps you gave above in power query editor for but I could not find the option 'expand to new rows'.
Kindly assist
HI @h0ttamale,
This could be done by Query Editor (M Language) as below steps:
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen
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!
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
Awesome! Thanks! Works perfectly.
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 |
---|---|
112 | |
99 | |
82 | |
70 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |