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
jsteffe
Helper III
Helper III

calendarauto returns nothing

I use this formula to automatically create a calendar but nothing happens. I get no date.

Calendar = CALENDARAUTO()
 
In my model I get a table with a field which is a date (I checked the format was date).
 
 
Thanks for your help.
8 REPLIES 8
Greg_Deckler
Super User
Super User

@jsteffe - That's definitely odd. You can do it the "hard" way like:

 

Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I tried your formula but I get no date too.

 

Calendar = CALENDAR(MIN('EXP'[SM réelle]);MAX('EXP'[SM réelle]))

 

calendar.png

The data type for my date field "SM Réelle" is date ...

Well, it's odd. So that returns a blank table??

 

What if you try date_livraison instead of SM Réelle?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Same result : blank table ...

I calculated Date_livraison from SM réelle to check if the problem comes from the name of the column ...

@jsteffe I can't explain it. Can you share your PBIX file or a stripped down version of it just to see if it is a version or regional language setting issue? You could check the Issues forum here:

https://community.powerbi.com/t5/Issues/idb-p/Issues

And if it is not there, then you could post it.

If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I just found my error : I put my formula in a new colum rather than writting it directly in the NEW TABLE.

 

Sorry for this. I feel so stupid and thanks for your help Greg ...

Hi, @jsteffe 

 

If you do not have a Date table in your data source, you can create such a table directly in the data model by adding calculated columns to a table built by using either CALENDAR or CALENDARAUTO.

 

CALENDARAUTO automatically finds the minimum and maximum year of all the date columns included across the whole data model, and generates all the dates included between these years. You can specify a month number as an argument to CALENDARAUTO. If provided, it generates dates from the first day of the following months to the last day of the month indicated as an argument. This is useful when you have a fiscal year that ends in a month other than December. 

 

Best Regards

Allan

 

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

@jsteffe Don't feel stupid! Stuff like that happens. Man, you had me going though!! 🙂

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.