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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Date Table

Hello! I need help with a  Date table based off my column labled Pick up date in My data. 

When I recently created a table based off Guy and a Cube but it gives me values from 1989 - 2049.

I Just need values based off the column I have  

 

Data pull is from 1/1/2019 - 10/20/2021

 

Pickup_Date
1/30/2019
1/30/2019
1/31/2019
1/2/2019
1/3/2019
1/1/2019
1/1/2019
1 ACCEPTED SOLUTION
DataZoe
Microsoft Employee
Microsoft Employee

@Anonymous 

 

To create a date table in DAX, you can go to Modeling -> New Table and try this:

Date = CALENDAR(MIN('TableName'[Pickup_Date]),MAX('TableName'[Pickup_Date]))

 

Also make sure your Pickup_Date is a Date Type as well:

DataZoe_0-1634749950600.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

4 REPLIES 4
HotChilli
Community Champion
Community Champion

CALENDARAUTO is a clever function which looks at every date field in your model and creates a date table to cover the whole range. 

So you want more control over your table and that would use the CALENDAR function (taking 2 parameters, start and end).  You can hardcode those parameters with specific dates (using DATE function) or refer to a specific table in your model as per @DataZoe 's answer.

I'll let you have a go at solving it.

Get back to us if it's not happening for you.

DataZoe
Microsoft Employee
Microsoft Employee

@Anonymous 

 

To create a date table in DAX, you can go to Modeling -> New Table and try this:

Date = CALENDAR(MIN('TableName'[Pickup_Date]),MAX('TableName'[Pickup_Date]))

 

Also make sure your Pickup_Date is a Date Type as well:

DataZoe_0-1634749950600.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

HotChilli
Community Champion
Community Champion

What formula are you using and are you creating the table in Power Query or DAX?

Anonymous
Not applicable

DAX and the formula is Calendarauto (6)

Var Base Calendar = CalendarAuto (6)
Return

Generate (BaseCalendar,
Var Base date = Date

Var Yeardate = Year (Base date)

Var Month Number = Month (Basedate)

Return Row (
"Day", Base Date,
"Year", Yeardate, ... repeat to Year Month

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.