• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

self referencing table_power query

Ari_25

New Member
Help please... have check a post here and it is practically what I need but it is not working for me.
I have table called Shipout that gets data from a power query. I added additional columns manually to the table, but when data refreshes, the data I manually entered, it stays in the same row I entered it and doesnt move with its row. here the procedureI followed.
 
Moderator Note:
Are You sure that Your link goes to single file?
... Your link give other kind of image.
Anyway, for others, it's more safe to send a file here.
 
Help please... have check a post here and it is practically what I need but it is not working for me.
I have table called Shipout that gets data from a power query. I added additional columns manually to the table, but when data refreshes, the data I manually entered, it stays in the same row I entered it and doesnt move with its row. here the procedureI followed.
Not sure how you are doing this, better to upload your file here, so at least we can see the code.
Since your lines "jump", it means you are most likely not joining correctly, or you have built it in an incorrect way.

Assume this input table "in".

IDName
1John
2Carl
3Ester
4Yasmin
5Ziggy

It's loaded on a different sheet, and you've added comments.
IDNameComment
1​
John
2​
CarlOrganized a pool competetion
3​
Esther
4​
YasminIs going hicking around the world
5​
Ziggy

Now data is added and changed:
IDName
2​
Carl
3​
Esther
4​
Yasmin
5​
Ziggy
6​
John
20​
Ester

Code:
let
    Updated_table = Excel.CurrentWorkbook(){[Name="in_1"]}[Content],
    Source = Excel.CurrentWorkbook(){[Name="in"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}}),
    #"Merged Queries" = Table.NestedJoin(#"Changed Type", {"ID", "Name"}, Updated_table, {"ID", "Name"}, "Updated_table", JoinKind.LeftOuter),
    Expand_updated_table = Table.ExpandTableColumn(#"Merged Queries", "Updated_table", {"Comment"}, {"Comment"})
in
    Expand_updated_table

In my example "Comment" is first loaded twice when you do the first refresh. Delete the one that's named "Comment2".
 
Last edited:
Back
Top