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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
monojchakrab
Resolver III
Resolver III

Append with only new rows of data

I am running into a problem while appending new data to an existing query.

 

I have a query which has got data till ytd Apr'22. But when I get new data every week for Apr and try to append it to the existing query (#YtdApr22), it duplicates the rows of data for the month of apr.

 

E.g. if #ytdapr22 had data upto 8th of Apr'22 and now i have a new set of data for mtd 16th Apr'22, if I append this new table to the existing table, it duplicates the rows from 1-8th apr already in the existing table@YtdApr22.

 

Is there a smarter solution at hand other than removing duplicates or deleting the Apr rows from the existing table every time I have to append and refresh the data with the new dates?

2 ACCEPTED SOLUTIONS
vojtechsima
Memorable Member
Memorable Member

Hi, @monojchakrab 
Isn'T that correct behaviour?
If you have data from 2022/01/01 till 2022/04/08 and you then append new data that are from 2022/04/01 till 2022/04/16, you will append the duplicates too.
If you get your update by week but it contains history of month, try filtering just the current week from the Updat table and then append it.
Or just simply remove duplicates automatically after the append, there's no manual work then after refresh.

View solution in original post

@monojchakrab 
You can do that, 
Or you can just filter the Update table so it contains just the current week (if your column is a Date column, there should be a dynamic function that lets you keep just the current week), if you don'T need to append historical data for the whole month, which I suppose you don't.

View solution in original post

3 REPLIES 3
vojtechsima
Memorable Member
Memorable Member

Hi, @monojchakrab 
Isn'T that correct behaviour?
If you have data from 2022/01/01 till 2022/04/08 and you then append new data that are from 2022/04/01 till 2022/04/16, you will append the duplicates too.
If you get your update by week but it contains history of month, try filtering just the current week from the Updat table and then append it.
Or just simply remove duplicates automatically after the append, there's no manual work then after refresh.

yes I could do that...thanks for pointing me in the right direction @vojtechsima . 

So you are saying I take the new MTD table every week and create a filtered table from that to keep only the most recent week and then append to the existing #Ytd table?

@monojchakrab 
You can do that, 
Or you can just filter the Update table so it contains just the current week (if your column is a Date column, there should be a dynamic function that lets you keep just the current week), if you don'T need to append historical data for the whole month, which I suppose you don't.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.