cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BossCo
Helper II
Helper II

PowerQuery: We cannot apply field access to the type Function.

Hi everybody,

 

I'm not very familiar with M, but I'm try to add a new column using a very simple expression:

 

if Date.Month [MyDate] < 5 then Date.AddDays ([MyDate], 365) else [MyDate]

 

Apparently, I'm missing out something since it returns me the following Expression Error:

 

PowerQuery: We cannot apply field access to the type Function.

 

Where am I going wrong?

 

Thanks everybody!

1 ACCEPTED SOLUTION
HotChilli
Super User II
Super User II

Date.Month is a function so you need to put the parameter in brackets.  That will move you on a bit

View solution in original post

2 REPLIES 2
BossCo
Helper II
Helper II

Thanks a lot! It works

HotChilli
Super User II
Super User II

Date.Month is a function so you need to put the parameter in brackets.  That will move you on a bit

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors