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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors