remove duplicate row names

ASadStudent

New Member
Joined
Oct 26, 2022
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hello everyone, I trying to make a power bi where I read a new file into my database each month. These files will be read in each month and so januari will be read in first and december will be read in last.

The file of each month contains not only the data from the month itself, but also from the previous month.
For example januari only has the data from januari in it but februari has the data from januari and februari in it. This goes on until december has the data from all 12 months in it.
This causes a problem where the data from januari is in in power bi 12 times which only needs to be in power bi once.

Secondly sometimes in the newer files data from previous months changes.
For example what was 10.000 in the file from januari now becomes 12.000 in the file from februari. This change isn't right and so I need to delete all rows except for the oldest one (The one that was read in first).

My plan was to delete these rows based on row name because the row names in each file are the same even if the data in them all isn't totally the same, but I can't find a way to do this.
So I wanted to ask if anyone of you can help me with my problem.

Thanks a lot for helping me!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Have you tried Remove Duplicates in the table's query?
 
Upvote 0
I'm puzzled by the issue. If you are reading from folder, you are loading all the data at once. I do not see how you are storing historized data somewhere. Since each file contains the data of the previous one, why not simply load latest file?
Source being the folder you're transforming data from.
Power Query:
Table.SelectRows(Source, let latest = List.Max(Source[Date created]) in each [Date created] = latest)
 
Upvote 0
Sorry everyone, I already found a way to solve my problem by reading the data in a different way.
 
Upvote 0
Good to hear you found a solution.
If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0

Forum statistics

Threads
1,223,981
Messages
6,175,775
Members
452,668
Latest member
mrider123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top