PIVOT TABLE SUM OF DISTINCT CHANGE ORDER #

mad3

Board Regular
Joined
Sep 15, 2009
Messages
128
Office Version
  1. 365
Platform
  1. Windows
I have a large data export with change orders. Each has one or more lines and the total amount for the project is listed on each line. I only want to sum the amount once for each CHANGE ID.

Change IdOrder #LineitemChange ReasonAmount
CH5591053027041Miscalculation$710.96
CH5591053027042Miscalculation$710.96
CH5651752929331Miscalculation$237.24
CH5652152929331Project Scope Changed$332.64
CH5652252929331Miscalculation$1,972.84
CH5703952943331Miscalculation$386,009.71
CH5703952943332Miscalculation$386,009.71
CH5703952943333Miscalculation$386,009.71
CH5767453038491Scope Change$19,583.67
CH5767453038492Scope Change$19,583.67
CH5782053006941Scope Change$21,721.00
CH5854153068651Project Scope Changed$1,094.70
CH5854153068652Project Scope Changed$1,094.70
CH5863552889921Scope Change$367,507.41
CH5863552889922Scope Change$367,507.41
CH5863552889923Scope Change$367,507.41
CH5863952889991Scope Change$99,100.00
CH5863952889992Scope Change$99,100.00
CH5864952889911Scope Change$279,300.00
CH5864952889912Scope Change$279,300.00
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
With Power Query
Book2
ABCDEFGHI
1Change IdOrder #LineitemChange ReasonAmountChange IdOrder #Amount
2CH5591053027041Miscalculation$710.96CH559105302704710.96
3CH5591053027042Miscalculation$710.96CH565175292933237.24
4CH5651752929331Miscalculation$237.24CH565215292933332.64
5CH5652152929331Project Scope Changed$332.64CH5652252929331972.84
6CH5652252929331Miscalculation$1,972.84CH570395294333386009.71
7CH5703952943331Miscalculation$386,009.71CH57674530384919583.67
8CH5703952943332Miscalculation$386,009.71CH57820530069421721
9CH5703952943333Miscalculation$386,009.71CH5854153068651094.7
10CH5767453038491Scope Change$19,583.67CH586355288992367507.41
11CH5767453038492Scope Change$19,583.67CH58639528899999100
12CH5782053006941Scope Change$21,721.00CH586495288991279300
13CH5854153068651Project Scope Changed$1,094.70
14CH5854153068652Project Scope Changed$1,094.70
15CH5863552889921Scope Change$367,507.41
16CH5863552889922Scope Change$367,507.41
17CH5863552889923Scope Change$367,507.41
18CH5863952889991Scope Change$99,100.00
19CH5863952889992Scope Change$99,100.00
20CH5864952889911Scope Change$279,300.00
21CH5864952889912Scope Change$279,300.00
Sheet1


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Removed Duplicates" = Table.Distinct(Source, {"Change Id"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Removed Duplicates",{"Change Id", "Order #", "Amount"})
in
    #"Removed Other Columns"
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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