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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

=[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.

View solution in original post

3 REPLIES 3
alexpancakes
Employee
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])

=[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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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