Data Transformation in Power Query

srehman

Board Regular
Joined
Jan 4, 2020
Messages
210
Office Version
  1. 2016
Platform
  1. Windows
Hi Team,

I need to transform below data into desired result any idea


! NBN Slotting Temp query-Table PQ.xlsx
LMNOPQR
1Required Result in Power Query
2Aisle001020304050
3EAA-L_59B-L_55C-L_64Dead_48Dead_40Dead_3
4EBA-L_28B-L_22C-L_68Dead_59Dead_37Dead_10
5ECA-L_45B-L_34C-L_70Dead_70Dead_45Dead_6
Sheet2




! NBN Slotting Temp query-Table PQ.xlsx
ABCDEFG
1Aisle001020304050
2EAA-L_59A-LA-LA-LA-LA-L
3EAB-LB-L_55B-LB-LB-LB-L
4EAC-LC-LC-L_64C-LC-LC-L
5EADeadDeadDeadDead_48Dead_40Dead_3
6EBA-L_28A-LA-LA-LA-LA-L
7EBB-LB-L_22B-LB-LB-LB-L
8EBC-LC-LC-L_68C-LC-LC-L
9EBDeadDeadDeadDead_59Dead_37Dead_10
10ECA-L_45A-LA-LA-LA-LA-L
11ECB-LB-L_34B-LB-LB-LB-L
12ECC-LC-LC-L_70C-LC-LC-L
13ECDeadDeadDeadDead_70Dead_45Dead_6
14EDA-L_80A-LA-LA-LA-LA-L
15EDB-LB-L_82B-LB-LB-LB-L
16EDC-LC-LC-L_78C-LC-LC-L
17EDDeadDeadDeadDead_56Dead_55Dead_1
18EEA-L_77A-LA-LA-LA-LA-L
19EEB-LB-L_48B-LB-LB-LB-L
20EEC-LC-LC-L_62C-LC-LC-L
21EEDeadDeadDeadDead_66Dead_37Dead_2
22EFA-L_61A-LA-LA-LA-LA-L
23EFB-LB-L_66B-LB-LB-LB-L
24EFC-LC-LC-L_66C-LC-LC-L
25EFDeadDeadDeadDead_64Dead_39Dead_10
26EGA-LA-L_72A-LA-LA-LA-L
27EGAA-L_74AA-LAA-LAA-LAA-LAA-L
28EGB-LB-LB-L_70B-LB-LB-L
29EGC-LC-LC-LC-L_66C-LC-L
30EGDeadDeadDeadDeadDead_62Dead_3
31EHA-LA-L_257A-LA-LA-LA-L
32EHAA-L_197AA-LAA-LAA-LAA-LAA-L
33EHB-LB-LB-L_84B-LB-LB-L
34EHC-LC-LC-LC-L_55C-LC-L
35EHDeadDeadDeadDeadDead_54Dead_1
36EIA-LA-L_78A-LA-LA-LA-L
37EIAA-L_87AA-LAA-LAA-LAA-LAA-L
38EIB-LB-LB-L_69B-LB-LB-L
39EIC-LC-LC-LC-L_68C-LC-L
40EIDeadDeadDeadDeadDead_49Dead
41EJA-LA-L_82A-LA-LA-LA-L
42EJAA-L_96AA-LAA-LAA-LAA-LAA-L
43EJB-LB-LB-L_69B-LB-LB-L
44EJC-LC-LC-LC-L_69C-LC-L
45EJDeadDeadDeadDeadDead_58Dead
46EKA-LA-L_365A-LA-LA-LA-L
47EKAA-L_318AA-LAA-LAA-LAA-LAA-L
48EKB-LB-LB-L_123B-LB-LB-L
49EKC-LC-LC-LC-L_128C-LC-L
50EKDeadDeadDeadDeadDead_117Dead_62
51ELA-LA-LA-L_73A-LA-LA-L
52ELAA-LAA-L_85AA-LAA-LAA-LAA-L
53ELAAA-L_103AAA-LAAA-LAAA-LAAA-LAAA-L
54ELB-LB-LB-LB-L_77B-LB-L
55ELC-LC-LC-LC-LC-L_62C-L
56ELDeadDeadDeadDeadDeadDead_17
57EMA-LA-LA-L_58A-LA-LA-L
58EMAA-LAA-L_65AA-LAA-LAA-LAA-L
59EMB-LB-LB-LB-L_51B-LB-L
60EMC-LC-LC-LC-LC-L_45C-L
61EMDeadDeadDeadDeadDeadDead_1
62ENA-LA-LA-L_50A-LA-LA-L
63ENAA-LAA-L_4AA-LAA-LAA-LAA-L
64ENB-LB-LB-LB-L_37B-LB-L
65ENC-LC-LC-LC-LC-L_40C-L
66ENDeadDeadDeadDeadDeadDead_3
67EOA-LA-LA-L_73A-LA-LA-L
68EOAA-LAA-L_171AA-LAA-LAA-LAA-L
69EOAAA-L_300AAA-LAAA-LAAA-LAAA-LAAA-L
70EOB-LB-LB-LB-L_62B-LB-L
71EOC-LC-LC-LC-LC-L_65C-L
72EODeadDeadDeadDeadDeadDead_20
73EPA-LA-LA-L_19A-LA-LA-L
74EPAA-LAA-L_6AA-LAA-LAA-LAA-L
75EPAAA-L_40AAA-LAAA-LAAA-LAAA-LAAA-L
76EPB-LB-LB-LB-L_29B-LB-L
77EPC-LC-LC-LC-LC-L_17C-L
78EPDeadDeadDeadDeadDeadDead_7
Sheet2
 

Attachments

  • Data Transform.PNG
    Data Transform.PNG
    30.4 KB · Views: 16

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I was trying keep trying finally
Got Results i need to perform unPivot & Pivot working 100 %



let
Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
#"Filtered Rows" = Table.SelectRows(Source, each ([Aisle] = "EA" or [Aisle] = "EB" or [Aisle] = "EC" or [Aisle] = "ED" or [Aisle] = "EE" or [Aisle] = "EF" or [Aisle] = "EG" or [Aisle] = "EH" or [Aisle] = "EI" or [Aisle] = "EJ" or [Aisle] = "EK" or [Aisle] = "EL" or [Aisle] = "EM" or [Aisle] = "EN" or [Aisle] = "EO" or [Aisle] = "EP")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Grand Total"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"Aisle", "Levels"}, "Attribute", "Value"),
#"Inserted Merged Column" = Table.AddColumn(#"Unpivoted Other Columns", "Merged", each Text.Combine({[Attribute], Text.From([Value], "en-AU")}, "_"), type text),
#"Removed Columns1" = Table.RemoveColumns(#"Inserted Merged Column",{"Attribute", "Value"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns1", List.Distinct(#"Removed Columns1"[Levels]), "Levels", "Merged")
in
#"Pivoted Column"
 
Upvote 0

Forum statistics

Threads
1,223,789
Messages
6,174,576
Members
452,573
Latest member
Cpiet

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