Forum Discussion

danextian's avatar
danextian
Icon for Super User rankSuper User
8 years ago
Solved

"Expression.Error: We cannot apply field access to the type Date." when doing List.Select

Hi All,   In the script below, the custom colmn created in  #"Custom 2" is returning an error "Expression.Error: We cannot apply field access to the type Date."  What I'am trying to achieve is sele...
  • OwenAuger's avatar
    8 years ago

    Hi danextian,

     

    The error seems to be caused in step #"Added Custom1" because [end] cannot be accessed within List.Select (rough explanation).

     

    You can fix this by storing [end] in a variable. Try this and it should work:

     

    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each let EndThisRow = [end] in List.Select([Custom], each _ <= EndThisRow))