accounts payable numbers with 1 to several bank accounts

Hi @tsv_ml_f21 ,

It would generally be best to at least give some sample data, or better yet a file, that could be copied/pasted, rather than a screenshot as this allows people to have a quick play as otherwise we have to try to imagine how it would work in our heads, which can lead to suggestions that don’t quite work.

I too was thinking unpivot, but then changed my mind to “pivot” but now having typed in some data, I found that even that became a little problematic.

I eventually settled on grouping (concatenating) by account number, and then unsplitting the cells.

image
It’s not quite perfect as it doesn’t return the columns in the order you showed. How important is that ordering to you?


Unstack Table.knwf (13.3 KB)

This is actually the reverse of the following problem:

and my solution (apart from the additional column renaming ) is roughly the reverse of the solution given there.

2 Likes