Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
alihijazi
Helper I
Helper I

Token eof expected

Hello

I'm trying to create a Calendar using List.Date function

I got the list correctly and I converted the list to a table

Now I want to create custom columns to have the year, month, etc...

However I'm getting an error saying Token eof expected; what's wrong? please adviseeof_expected.png

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

=[Date].Year([Date]) is not a valid formula.

 

Try duplicating the date column 3 times.  Then for each new column, use the menu Transform\Date\Year etc



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

3 REPLIES 3
alexpancakes
Microsoft Employee
Microsoft Employee

= Date.Year([Date]) is the correct formula.

So "Date.Year()" is the function and the "[Date]" is it's argument.

SabineOussi
Skilled Sharer
Skilled Sharer

Try

Date.Year([Date])

Date.Month([Date])

MattAllington
Community Champion
Community Champion

=[Date].Year([Date]) is not a valid formula.

 

Try duplicating the date column 3 times.  Then for each new column, use the menu Transform\Date\Year etc



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.