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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
colourfullife
Post Partisan
Post Partisan

Calendarauto

Hi there, Is there any other codes that i can use instead of calendarauto.

I usually go for calendarauto to make a date table to connect with my data to create progress or plan by week report.

The problem is this code collects all the dates from my data even though it's not correct date like 1939 which was put in accident in database. i don't want to correct database inccorrect date every single time.. 

 

please let me know there is any other code but same function.!

 

thanks

CL

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@colourfullife 

you can define the range for a date table like so.

Dates = CALENDAR ( DATE ( 2018, 1, 1 ), DATE ( 2020, 12, 31 ) )

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@colourfullife - Just use CALENDAR(DATE(...),DATE(...))



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
jdbuchanan71
Super User
Super User

@colourfullife 

you can define the range for a date table like so.

Dates = CALENDAR ( DATE ( 2018, 1, 1 ), DATE ( 2020, 12, 31 ) )
amitchandak
Super User
Super User

@colourfullife , refer if these calendar's can help

1.Creating Financial Calendar - Decoding Date and Calendar 1-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...
2.Any Weekday Week - Decoding Date and Calendar 2-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

You can start calendar like

calendar(Min(Table[Date]), Today())

calendar(date(1990,1,1), Today())

calendar(date(1990,1,1), date(2025,12,31))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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