cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudhirreddy Visitor
Visitor

Expression.Error: The name 'YEAR' wasn't recognized. Make sure it's spelled correctly.

Hi Team,

 

 

I am trying to extract the Year from birthdate(DD-MM-YYYY). I am trying to create a custom column  from the date (= YEAR[birthdate]), but I am getting this error

 

f(x) = Table.AddColumn(#"Changed Type1", "Custom", each YEAR[birthdate])

Expression.Error: The name 'YEAR' wasn't recognized. Make sure it's spelled correctly.
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: Expression.Error: The name 'YEAR' wasn't recognized. Make sure it's spelled correctly.

Hi @sudhirreddy

 

Power Query uses the Date.Year() function to return the year value from the date value. 

 

w1.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Moderator v-qiuyu-msft
Moderator

Re: Expression.Error: The name 'YEAR' wasn't recognized. Make sure it's spelled correctly.

Hi @sudhirreddy

 

Power Query uses the Date.Year() function to return the year value from the date value. 

 

w1.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 141 members 1,476 guests
Please welcome our newest community members: