Power Query, What Am I missing here.

rp2019

New Member
Joined
Jul 9, 2019
Messages
11
Expression.Error: We cannot apply field access to the type List.
Details:
Value=List
Key=PO Number
 
Last edited by a moderator:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Expression.Error: We cannot apply field access to the type List.
Details:
Value=List
Key=PO Number

https://www.mrexcel.com/forum/image...rEAa56yJVLR0ssXiGKizPZbIGcWOI3JtsAwWTM2MYknne OLN7dXy3t z/N099NANwaYf8QA34 qRfSDRncDTz9PP79 nu7Zs7a2dvX73/8 PvGJT4D6E/OfthuPse7FvCEi6k6sn7uD5MOHR4ftHPWKnyws49fsayIiIiIiIqK wB7hXUzybTO8PG83/xcXF 0r4MMf/jCuv/56O0e9aqePMWofyz8RUXfiubM7bGU NPYIn3z8P CRx/9nOwc89od/ov 97p//c/z xOfwr377t/D//Zf/glf/92/gP/3t3 O6667D4T/8NP6HWz sl6ONk57czfDyUtbTViD83nvv4ezZs/jJT36i59PpNA4ePKhf07Uj fbAAw/Yuc688MILHVe0X/jCF/zG7z/ 4z/i85//vG4QU ...

I don't know this kind of code, it's any new language?
 
Upvote 0
I am new here, I copy pasted an image and it came that way.

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"IDoc number", Int64.Type}, {"Counter", Int64.Type}, {"Segment No.", Int64.Type}, {"SAP segment name", type text}, {"No. higher segment", Int64.Type}, {"Hierarchy level", Int64.Type}, {"Data Filter Value fo", type any}, {"Length", Int64.Type}, {"Application data", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Data Filter Value fo", "Hierarchy level", "No. higher segment", "Counter"}),
AddedIndex = Table.AddIndexColumn(#"Removed Columns", "Index", 0, 1),
#"Added Custom1" = Table.AddColumn(AddedIndex, "PO Number", each if [#"Segment No."] = 1 then
Text.Trim (Text.Start([Application data],35))
else {[Index]-1}[#"PO Number"])
in
#"Added Custom1"
 
Upvote 0
your code should be between [CODE]...[/CODE] tags like

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IDoc number", Int64.Type}, {"Counter", Int64.Type}, {"Segment No.", Int64.Type}, {"SAP segment name", type text}, {"No. higher segment", Int64.Type}, {"Hierarchy level", Int64.Type}, {"Data Filter Value fo", type any}, {"Length", Int64.Type}, {"Application data", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Data Filter Value fo", "Hierarchy level", "No. higher segment", "Counter"}), AddedIndex = Table.AddIndexColumn(#"Removed Columns", "Index", 0, 1),
    #"Added Custom1" = Table.AddColumn(AddedIndex, "PO Number", each if [#"Segment No."] = 1 then Text.Trim (Text.Start([Application data],35)) else {[Index]-1}[#"PO Number"])
in
    #"Added Custom1"

and post example [edit]of source[/edit] data associated with this code
 
Last edited:
Upvote 0
your code should be between [CODE]...[/CODE] tags like

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IDoc number", Int64.Type}, {"Counter", Int64.Type}, {"Segment No.", Int64.Type}, {"SAP segment name", type text}, {"No. higher segment", Int64.Type}, {"Hierarchy level", Int64.Type}, {"Data Filter Value fo", type any}, {"Length", Int64.Type}, {"Application data", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Data Filter Value fo", "Hierarchy level", "No. higher segment", "Counter"}), AddedIndex = Table.AddIndexColumn(#"Removed Columns", "Index", 0, 1),
    #"Added Custom1" = Table.AddColumn(AddedIndex, "PO Number", each if [#"Segment No."] = 1 then Text.Trim (Text.Start([Application data],35)) else {[Index]-1}[#"PO Number"])
in
    #"Added Custom1"

and post example data associated with this code


[TABLE="width: 784"]
<colgroup><col width="105" style="width: 79pt; mso-width-source: userset; mso-width-alt: 3840;"> <col width="150" style="width: 113pt; mso-width-source: userset; mso-width-alt: 5485;"> <col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <col width="568" style="width: 426pt; mso-width-source: userset; mso-width-alt: 20772;"> <col width="59" style="width: 44pt; mso-width-source: userset; mso-width-alt: 2157;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3510;"> <tbody>[TR]
[TD="width: 105"]Segment No.[/TD]
[TD="width: 150"]SAP segment name[/TD]
[TD="width: 67"]Length[/TD]
[TD="width: 568"]Application data[/TD]
[TD="width: 59"]Index[/TD]
[TD="width: 96"]PO Number[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]E1EDK09[/TD]
[TD="align: right"]1000[/TD]
[TD]A11517 20190625190625 B[/TD]
[TD="align: right"]-1[/TD]
[TD]A11517[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"]E1EDKA1[/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]LF FTL MFG[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]E1EDKA1[/TD]
[TD="align: right"]1000[/TD]
[TD]YSCBW 7[/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4[/TD]
[TD="bgcolor: transparent"]E1EDK11[/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]YHT1 1 Customer Horizon Start Date: 06/25/19 Customer Horizon End Date: 12/22/19[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]E1EDK11[/TD]
[TD="align: right"]1000[/TD]
[TD]YHT1 2 TMP 92 = 001[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent"]E1EDP10[/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]BW K151860 001 0.000000 20190624 20190625 0.000000 03 534[/TD]
[TD="bgcolor: transparent, align: right"]4[/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]E1EDP16[/TD]
[TD="align: right"]1000[/TD]
[TD]4W20190809 20190809 6[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]E1EDK09[/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]A11517 20190625190625 B[/TD]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent"]A11517[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
@rp2019
Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
Also do not make spurious posts on other threads.
 
Upvote 0
[TABLE="width: 504"]
<colgroup><col width="89" style="width: 67pt; mso-width-source: userset; mso-width-alt: 3254;"> <col width="134" style="width: 101pt; mso-width-source: userset; mso-width-alt: 4900;"> <col width="64" style="width: 48pt;" span="7"> <tbody>[TR]
[TD="width: 89, bgcolor: transparent"]number[/TD]
[TD="width: 134, bgcolor: transparent"]Counter[/TD]
[TD="width: 64, bgcolor: transparent"]Segment No.[/TD]
[TD="width: 64, bgcolor: transparent"]SAP segment name[/TD]
[TD="width: 64, bgcolor: transparent"]No. higher segment[/TD]
[TD="width: 64, bgcolor: transparent"]Hierarchy level[/TD]
[TD="width: 64, bgcolor: transparent"]Data Filter Value fo[/TD]
[TD="width: 64, bgcolor: transparent"]Length[/TD]
[TD="width: 64, bgcolor: transparent"]Application data[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]E1EDK09[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]A11517 20190625190625 B[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"]E1EDKA1[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]LF FTL MFG[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]3[/TD]
[TD="bgcolor: transparent"]E1EDKA1[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]YSCBW 7[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]4[/TD]
[TD="bgcolor: transparent"]E1EDK11[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]YHT1 1 Customer Horizon Start Date: 06/25/19 Customer Horizon End Date: 12/22/19[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]5[/TD]
[TD="bgcolor: transparent"]E1EDK11[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]YHT1 2 TMP 92 = 001[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent"]E1EDP10[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]BW K151860 001 0.000000 20190624 20190625 0.000000 03 534[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313708998[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]7[/TD]
[TD="bgcolor: transparent"]E1EDP16[/TD]
[TD="bgcolor: transparent, align: right"]6[/TD]
[TD="bgcolor: transparent, align: right"]3[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]4W20190809 20190809 6[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313709018[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]E1EDK09[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]A11517 20190625190625 B[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]313709018[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"]E1EDKA1[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1000[/TD]
[TD="bgcolor: transparent"]LF FTL MFG
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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