Forum Discussion
danextian
Super User
8 years ago"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...
- 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))
OwenAuger
Super User
8 years agoYou're welcome :)
Here is a post dealing with a similar problem, though they solve it in a slightly different way:
Also you can refer to the Power Query Language Specification:
https://msdn.microsoft.com/en-us/query-bi/m/power-query-m-language-specification
It looks like page 85 relates to this topic, but I haven't read it properly.
danextian
Super User
8 years agoI'll probably have to keep reading Lars & Imke's psot over and over again. :)