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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bhmiller89
Helper V
Helper V

Create Date Table based on Min/Max of Existing Data

I usually create a date table for my data using the usual way of defining specific beginning and end dates. I wanted to know if it is possible to create a date table based on the existing data. 

 

For example, I have a table that tracks service requests which all have a start date and an end date. If I want my date table to start at the MIN Service Rquest Start Date and end at the MAX Service Request Start Date, is that possible? 

1 ACCEPTED SOLUTION
venug20
Resolver I
Resolver I

@bhmiller89

 

go to ..> Model --> choose --> new table,

 

As per your requirement, use below formula to create table.

 

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

 

 

Calender-Table.jpg

 

 

If it is solution to query, accept as solution... it is useful to others....

 

View solution in original post

5 REPLIES 5
venug20
Resolver I
Resolver I

@bhmiller89

 

go to ..> Model --> choose --> new table,

 

As per your requirement, use below formula to create table.

 

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

 

 

Calender-Table.jpg

 

 

If it is solution to query, accept as solution... it is useful to others....

 

Anonymous
Not applicable

Is it possible to pull this formula created table into the "power query editor" where we can add date columns with date properties such as day of week, quarter 1, etc?  Like the screen below.

AddDateFields.PNG

Anonymous
Not applicable

Did you ever find a solution to your question? I am trying to do the same thing myself.

Try this:

 

Date = ADDCOLUMNS (CALENDARAUTO(),
"Year", YEAR ([Date]),
"Month", FORMAT([Date], "mmmm"),
"Month Number", MONTH([Date]),
"Quarter", FORMAT([Date], "\QQ")
)
Anonymous
Not applicable

this is awesome! Exactly what I was looking for.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors