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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.