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:

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
5,716
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?
 

rp2019

New Member
Joined
Jul 9, 2019
Messages
11
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"
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
5,716
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:

rp2019

New Member
Joined
Jul 9, 2019
Messages
11
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

Segment No.SAP segment nameLengthApplication dataIndexPO Number
1E1EDK091000A11517 20190625190625 B-1A11517
2E1EDKA11000LF FTL MFG0
3E1EDKA11000YSCBW 71
4E1EDK111000YHT1 1 Customer Horizon Start Date: 06/25/19 Customer Horizon End Date: 12/22/192
5E1EDK111000YHT1 2 TMP 92 = 0013
6E1EDP101000BW K151860 001 0.000000 20190624 20190625 0.000000 03 5344
7E1EDP1610004W20190809 20190809 65
1E1EDK091000A11517 20190625190625 B6A11517
<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> </tbody>
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,320
Office Version
365
Platform
Windows
@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.
 

rp2019

New Member
Joined
Jul 9, 2019
Messages
11
numberCounterSegment No.SAP segment nameNo. higher segmentHierarchy levelData Filter Value foLengthApplication data
31370899801E1EDK09011000A11517 20190625190625 B
31370899802E1EDKA1121000LF FTL MFG
31370899803E1EDKA1121000YSCBW 7
31370899804E1EDK11121000YHT1 1 Customer Horizon Start Date: 06/25/19 Customer Horizon End Date: 12/22/19
31370899805E1EDK11121000YHT1 2 TMP 92 = 001
31370899806E1EDP10121000BW K151860 001 0.000000 20190624 20190625 0.000000 03 534
31370899807E1EDP166310004W20190809 20190809 6
31370901801E1EDK09011000A11517 20190625190625 B
31370901802E1EDKA1121000LF FTL MFG
<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> </tbody>
 

Watch MrExcel Video

Forum statistics

Threads
1,101,749
Messages
5,482,640
Members
407,356
Latest member
fabioargenton

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top