Forum Discussion
Error relating to the DATE Function when creating a Date table - Too Few Arguments Passed
- 9 years ago
OK, I have got this working now and the solution is as Bizarre as the initial problem. Below is the DAX syntax that worked.
DateTable = CALENDAR(DATE(2015 ,01 ,01),DATE(2016 , 01 , 01) )
What's different? I hear you ask, well, before the comma delimiter between there is a space, so, "2015 ," instead of "2015,". Same for the Month.
If anyone could explain this, I would love to know the reason this is happening.
Thanks
Chris
Chris,
I copy-pasted your DAX into PBi Desktop and it worked just fine for me. Special character somewhere?!
Hi Steve,
Thanks for checking it, yes, definitely no special characters, it's exactly as it is in that screenshot, it's the most bizarre and frustrating issue. I don't know if it's got something to do with my local machine date and time settings or Culture, but it must be something other than syntax as the DAX is definitely correct.
Thanks
Chris
- cronline9 years agoRegular Visitor
OK, I have got this working now and the solution is as Bizarre as the initial problem. Below is the DAX syntax that worked.
DateTable = CALENDAR(DATE(2015 ,01 ,01),DATE(2016 , 01 , 01) )
What's different? I hear you ask, well, before the comma delimiter between there is a space, so, "2015 ," instead of "2015,". Same for the Month.
If anyone could explain this, I would love to know the reason this is happening.
Thanks
Chris
- Anonymous9 years agoNot applicable
I ran into the same issue.
An other way to work around this is by enclosing all values in ()
DATE((2016),(1),(1))
I think it has something to do with regional settings causing the comma to be interpreted as a decimal sign.
- michellepace6 years agoResolver III
Goodness, two years later and I'm finding the same issue.
DateTable = CALENDAR(DATE(2015 ,01 ,01),DATE(2016 , 01 , 01) ) ... this works
DateTable = CALENDAR(DATE(2015,01 ,01),DATE(2016 , 01 , 01) ) ... this gives me the above error
- Anonymous9 years agoNot applicableThat's weird.