Forum Discussion
Splitting columns into multiple rows
- 2 years ago
To achive the desired result you can use index column: before appending datasets you create an index in each of them. After you append queries as new they will be listed one under another (so Dataset A and then Dataset B). However, because you index column, you can sort them in a desired way (once you're done, you can delete index column in the final dataset in case you don't need it anymore):
I also don't remember whether you start with 2 separate datasets or you have just one, which you first need to split. In attached pbix you'll find both option (when you select one of them, just delete the second)
Is it what you've been looking for? 🙂
What are the columns of "Orange" and "Pink" tables? Are column names the same? You need to have different column names to achieve the desired result.
Let's summarize once again how "Append" works: first it searches for columns with the same names in the input tables. If found, rows of those columns are appended one under another. In the case when column names are different (so append can't find same names), columns that don't exist in the first table are added to the second one (rows of the first table for that new columns remain empty).
Check pbix attached for further details.
Good luck with your project and have a great day 🙂
Hi Sergii
Thanks for getting back to me. I think I may not have explained correctly. I have multiple rows of data, not just one. And when I append, rather than alternating rows, its putting the two separate tables under one another, hope that makes sense?
So just to recap this is an example of what I start with
Want to achieve this
But append only does this;