cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
emveha Member
Member

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-jiascu-msft
Microsoft

Re: dax calendar eomonth min/max

Hi @emveha,

 

Try this formula please.

dCalendar02 =
CALENDAR (
    EOMONTH ( MIN ( 'Time registration'[ActivityDate] ); -1 ) + 1;
    EOMONTH ( MAX ( 'Time registration'[ActivityDate] ); 0 )
)

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

16 REPLIES 16
Super User I
Super User I

Re: dax calendar eomonth min/max

@emveha works find for me are you creating a new table?


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
gooranga1 Senior Member
Senior Member

Re: dax calendar eomonth min/max

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?

emveha Member
Member

Re: dax calendar eomonth min/max

yes, want to create a new table.....

emveha Member
Member

Re: dax calendar eomonth min/max

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

Microsoft v-jiascu-msft
Microsoft

Re: dax calendar eomonth min/max

Hi @emveha,

 

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.

dax calendar eomonth minmax.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
emveha Member
Member

Re: dax calendar eomonth min/max

hi,

changed my regional settings but still the same error...

Any ideas that would help solving this?

thnx

emveha

Microsoft v-jiascu-msft
Microsoft

Re: dax calendar eomonth min/max

@emveha

 

Hi Emveha,

 

Could you please post a snapshot about the error here?

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
emveha Member
Member

Re: dax calendar eomonth min/max

error mssg calendar.png

hope this will help...

Microsoft v-jiascu-msft
Microsoft

Re: dax calendar eomonth min/max

Hi @emveha,

 

Try this formula please.

dCalendar02 =
CALENDAR (
    EOMONTH ( MIN ( 'Time registration'[ActivityDate] ); -1 ) + 1;
    EOMONTH ( MAX ( 'Time registration'[ActivityDate] ); 0 )
)

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors