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? 🙂
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;
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? 🙂
- Ry0092 years agoHelper II
Thank you so much Sergii!
This is what I was after (from single dataset) 🙂What I neglected to include the requirement that the primary id in column A needs to be represented in the row underneath it for the corresponding index.
After 30 mins of looking for a solution.....stupid me realised, just keep it in both tables so when it appends, it will be in both. 🙂Thank you so much!