Forum Discussion
Power Query - Self Referencing Tables for adding comments etc
So after reading this thread I figured I'd try my hand and follow instructions from this link.
However, after a bit of testing this morning, I can't quite seem to get it to work. I can get a comments section in, and it doesn't disappear after a refresh, but it's not logically linked to the data.
It does appear that this is an older workaround, with edits in 2017 and 2020 to account for changes in PQ.
I have attached my attempted spreadsheet below.
Any assistance gladly received!
davidmaddock54 The posting you referred to included one link (of many) to an article about how to create self referencing tables in PQ. Looking at your particular situation, perhaps the attached version works better for you. All is condensed into one query.
See if you can follow the steps, though it required some manipulation of the M-code. The key is that you create two Sources and merge one to the other within the same query.
- Riny_van_EekelenPlatinum Contributor
davidmaddock54 The posting you referred to included one link (of many) to an article about how to create self referencing tables in PQ. Looking at your particular situation, perhaps the attached version works better for you. All is condensed into one query.
See if you can follow the steps, though it required some manipulation of the M-code. The key is that you create two Sources and merge one to the other within the same query.
- davidmaddock54Brass ContributorOnce again, life saver! Took me a second to work out how to add the second custom step to create what you called "Source2" but once I got that, the rest makes sense.
Now I need to think about the ramifications of the data being editable by folks using it! - mollynoel98Copper Contributor
Hello. I have been trying to create a Self Referencing Table with 4 additional collumns from my query / pivot table. I have gotten to the very end, however every time I import my merged queries, it is showing duplicate columns.
Just remove duplicated columns in the resulting table and refresh. The won't appear again. If you merge correctly.