Forum Discussion
"Expression.Error: We cannot apply field access to the type Date." when doing List.Select
- 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))
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))
- danextian8 years ago
Super User
Hi OwenAuger
Thanks for the response. Your solution works like a charm.
On a side note, do you happen to have a link to a documentation relataed to this?
- OwenAuger8 years ago
Super User
You'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.
- danextian8 years ago
Super User
I'll probably have to keep reading Lars & Imke's psot over and over again. :)