Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
CloudMonkey
Post Prodigy
Post Prodigy

How to use equivalent of CALENDARAUTO() in query editor?

Hi,

 

In the query editor please can you tell me how to automatically create a list of all calendar dates?

 

Thanks,

 

CM

2 ACCEPTED SOLUTIONS
Phil_Seamark
Microsoft Employee
Microsoft Employee

v-sihou-msft
Microsoft Employee
Microsoft Employee

@CloudMonkey

 

Power Query can't automatically detect the date range within data model to generate list of dates, which means it can only work as CALENDAR() function so that you have to manually specify the start and end dates to create this calendar table. 

 

I suggest you create a calculated table with Power Query, group records with Max and Min aggregation, please refer to threads below:

 

https://www.experts-exchange.com/questions/28990135/Find-Minimum-and-Maximum-Dates-in-a-column-using...

 

https://community.powerbi.com/t5/Desktop/Power-Query-find-minimum-maximum-dates-across-multiple-tabl...

 

Then use Power Query to create a custom calendar based on the calculated table with StartDate and EndDate as Phil's provided article suggested. 

 

Regards,

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@CloudMonkey

 

Power Query can't automatically detect the date range within data model to generate list of dates, which means it can only work as CALENDAR() function so that you have to manually specify the start and end dates to create this calendar table. 

 

I suggest you create a calculated table with Power Query, group records with Max and Min aggregation, please refer to threads below:

 

https://www.experts-exchange.com/questions/28990135/Find-Minimum-and-Maximum-Dates-in-a-column-using...

 

https://community.powerbi.com/t5/Desktop/Power-Query-find-minimum-maximum-dates-across-multiple-tabl...

 

Then use Power Query to create a custom calendar based on the calculated table with StartDate and EndDate as Phil's provided article suggested. 

 

Regards,

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @CloudMonkey

 

Please try these steps

 

https://powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.