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
Anonymous
Not applicable

DAX CALENDAR syntax issue

I tried to create a dateTable using 

CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2017, 12, 31 ) )

I kept getting the error message

  "The syntax for '.1' is incorrect.(DAX(CALENDAR(DATE(2005, 1, 1), DATE (2015, 12, 31))))."

 

I tried ; as well no luck

 

It only works when we add two commas

 

dateTable = CALENDAR (DATE(2017,,1,,1), DATE(2017,,12,,31))

 

My regional setting is English (South Africa)

Desktop version Version: 2.54.4970.961 64-bit (January 2018)

 

 

6 REPLIES 6
GerberDK
Regular Visitor

Two commas solved the problem, but strange syntax

Anonymous
Not applicable

I had the same issue. The Decimal and List Seperator had the same value, so I changed Decimal to a '.' and started working again.

v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

As your region set as English (South Africa), by default the list separator is " ; ". 

 

In your scenario, if you don't change the list separator, you can specify the DAX to create a calendar table below:

 

Table = CALENDAR ( DATE ( 2017;1; 1 ); DATE ( 2017; 12; 31 ) )

 

q2.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.
Anonymous
Not applicable

Hi Qiuyun Yu,

 

Not sure if you got my previous reply but changing to ; did not work.

 

still syntax error.PNG

Hi @Anonymous,

 

Would you please check the List operator format in your region for OS? 

 

q6.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.
Anonymous
Not applicable

Hi Qiuyun Yu,

 

I have the same issue, the dax formula only works when I use the double comma's even when my List Separator is set to [ , ]. So it seems that this setting is not responsible for the syntax error.


Power BI Desktop.png

 

List separator set to [ , ]List separator set to [ , ]

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.