cancel
Showing results for 
Search instead for 
Did you mean: 
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 a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

3 REPLIES 3
alexpancakes
Microsoft
Microsoft

= 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 a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.

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.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors