Calc on Duplicate Line

DavidG007

Board Regular
Joined
Jul 6, 2018
Messages
79
Office Version
  1. 365
Platform
  1. Windows
Hi, just wondering if anyone would be able to help with the following query.

The table below is a sample of the data produced by the power query.
Account NumberDepartment CodeCategoryKeep or Remove?
84000001-001701000CostBasedRemove
84000001-001701000RevenueBasedKeep

I need to be able to determine that when I have a duplicate line, i.e. 'Account Number' and 'Department Code' are the same (I could concatenate to make the duplicate simpler to identify?), that I then only select the 'Category' that is "RevenueBased".

At the moment I am having to do this via a query in excel but it is taking over an hour to run due to the volume of cells it is calculating!

Any help would be really appreciated,

Thanks.
 

Attachments

  • PowerQuery Help.JPG
    PowerQuery Help.JPG
    34.7 KB · Views: 20

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi,

you can select the two columns in Power Query and from Add Column choose Merge Columns. This will insert the concatenated column

1598368782692.png


then right-click on the new merged column and select remove duplicates

1598378806504.png
 
Upvote 0

Forum statistics

Threads
1,223,768
Messages
6,174,414
Members
452,562
Latest member
Himeshwari

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