Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Refresh Table without adding duplicates?

Completely new to power query so forgive my ignorance. 

I'm trying to get a table to update every 24 hours without duplicating entries. 

 

The table has a unique field which should only appear once, followed by several columns of associated data. 

 

I've managed to get a power query to populate the table initially, but on refresh it just seems to add the same data again. 

 

I would like it to add new rows where the unique field does not exist, and where the field DOES exist, update that specific row to the newly refreshed data (not bothered if it's changed or not, just overwrite whatever the current values are) 

can anyone help me with this? 

1 ACCEPTED SOLUTION
jbwtp
Memorable Member
Memorable Member

Hi @Syndicate_Admin,

 

The solution maybe somethinglike this (please be aware on large datasets this can be slow):

 

let
    ExistingData = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIxV4rViVYyAjLNjMBMY4SoCZBpaghmmgKZlkAFsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
    NewData = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlHSAeJYnWglUyDL0hTMNAMyTQ2VYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
    LeaveExisting = Table.NestedJoin(ExistingData, {"Key"}, NewData, {"Key"}, "NewData", JoinKind.LeftAnti),
    #"Removed Columns" = Table.Combine({Table.RemoveColumns(LeaveExisting,{"NewData"}), NewData})
in
    #"Removed Columns"

 

 

But, depending on your requirements, I would investiagte in the space of incremental refresh this could be a better/more effective solution to what you are trying to achieve.

 

Kind regards,

John

View solution in original post

1 REPLY 1
jbwtp
Memorable Member
Memorable Member

Hi @Syndicate_Admin,

 

The solution maybe somethinglike this (please be aware on large datasets this can be slow):

 

let
    ExistingData = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIxV4rViVYyAjLNjMBMY4SoCZBpaghmmgKZlkAFsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
    NewData = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlHSAeJYnWglUyDL0hTMNAMyTQ2VYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
    LeaveExisting = Table.NestedJoin(ExistingData, {"Key"}, NewData, {"Key"}, "NewData", JoinKind.LeftAnti),
    #"Removed Columns" = Table.Combine({Table.RemoveColumns(LeaveExisting,{"NewData"}), NewData})
in
    #"Removed Columns"

 

 

But, depending on your requirements, I would investiagte in the space of incremental refresh this could be a better/more effective solution to what you are trying to achieve.

 

Kind regards,

John

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.