I have data like below.
I need to keep same column on basis of 1,2,3,5,9 and column 6,7,8 need to be combined or merged into one.
For the below example first 8 rows are duplicated but in actual there are 4 rows. Row 9 and 10 are seperate cases.
what can be the best possible way to do it. I tried to use vlookup, merge, concat to make a primary key and merge but somehow all my rows were not found.
| column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |
|---|---|---|---|---|---|---|---|---|---|
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | state | 1 | ||
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | state | 2 | ||
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | state | 3 | ||
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | state | 4 | ||
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | Type AB | ||||
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | Type AB | ||||
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | Type AB | ||||
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | Type AB | ||||
| Alpha | DataColumn | massWeight | DIFFERENT COLUMN ITEM | ItemColumn | xyz | state | 11 | ||
| AlphBetaa | DataColumn | massWeight | VERY DIFFERENT COLUMN ITEM | ItemColumn | Type AB | A | state | 12 |
Expected outcome:
| column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |
|---|---|---|---|---|---|---|---|---|---|
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | Type AB | state | 1 | |
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | Type AB | state | 2 | |
| Greater Country1 | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | Type AB | state | 3 | |
| See Data | DataColumn | massWeight | ColumnNameSame | ItemColumn | xyz | Type AB | state | 4 | |
| Alpha | DataColumn | massWeight | DIFFERENT COLUMN ITEM | ItemColumn | xyz | state | 11 | ||
| AlphBetaa | DataColumn | massWeight | VERY DIFFERENT COLUMN ITEM | ItemColumn | Type AB | A | state | 12 |
Thanks in advance.
When i try the Power Query method, the last column is not coming correct.



Column9in the grouping, then you have six (6) different rows, not four (4). Please explain.