Forum Discussion
dax calendar eomonth min/max
hi all,
am trying to create a table with all dates of a year and did it like this:
yrCalendar= CALENDAR(EOMONTH(MIN('Treg'[ActivityDate]),-1)+1,EOMONTH(MAX('Treg'[ActivityDate]),0)) but i get an error message= The syntax for '.0' is incorrect. DAX(CALENDAR(EPOMONTH(MIN( etc etc))
Why do i get this message and what do i need to do to solve it.
thnx
Mrt
Hi Anonymous,
Try this formula please.
dCalendar02 = CALENDAR ( EOMONTH ( MIN ( 'Time registration'[ActivityDate] ); -1 ) + 1; EOMONTH ( MAX ( 'Time registration'[ActivityDate] ); 0 ) )Best Regards!
Dale
16 Replies
- vanessafvg
Community Champion
Anonymous works find for me are you creating a new table?
- AnonymousNot applicable
yes, want to create a new table.....
- gooranga1
Power Participant
I just tried it on a test dataset here and it works okay
dCalendar02 = CALENDAR(EOMONTH(min(Query1[event_timestamp]),-1)+1,EOMONTH(max(Query1[event_timestamp]),0))
from your error message it would seem that that the error is because of a full stop before your zero rather than a comma in the final EOMONTH function?
- AnonymousNot applicable
again, it s strange that someone else just informed me that for him/her it works.....
this is my function:
dCalendar02 = CALENDAR(EOMONTH(min('Treg'[ActivityDate]),-1)+1,EOMONTH(MAX('Treg'[ActivityDate]),0))
what is strange is, is the fact that after i have entered my function, the comma next to the first ActivityDate is changed from a comma to a semi column....
dCalendar02 = CALENDAR(EOMONTH(min('Treg'[ActivityDate]);-1)+1, etccc
- v-jiascu-msft
Microsoft Employee
Hi Anonymous,
It's hard for me to tell why the change happened. Formats in Power BI connect to "Formats" in the local computer. According to the error message "..syntax...", maybe it's something wrong with ";" or "," in the formula. (This picture just shows one example)
BTW, the formula works well.
Best Regards!
Dale