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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
thebigwhite
Helper II
Helper II

Loading a table based on Min / Max from another Table

Good morning, 

I would like to have some tips on this scenario: 

 

I need to load a calendar table based on a time range interval which is coresponding to the Max And Min Date of another table. 

How you would manage it?

Thanks 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@thebigwhite , Based on what I got

You can try like

Date =calendar(Min(Table[Date]),Max(Table[Date]))

 

or date =calendarauto()

You can use addcolumns on top of it add other calendar columns


https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
swise001
Continued Contributor
Continued Contributor

@thebigwhite 

 

Are you trying to build a calendar table from scratch based on the date range in your 'fact' table?

 

There are a lot of ways to do this:  Here's one way: 

 

1.  Extract the MAX and MIN dates from a dulicate of your FACT Table: 
Use the Group By function and extract Max and Min from the date column

swise001_0-1600429480428.png

Then add two custom columns that identify the start of the month and end of the month for your date range. 

EndDate = Date.EndOfMonth([Max Date])
StartDate = Date.StartofMonth([Min Date])

swise001_1-1600429661820.png

 

Then use this formula to make a list of all the days between your start date and end date

{Number.From([StartDate])..Number.From([EndDate])}

 

Remove all the other columns - and expand the list

swise001_2-1600429751453.png

Change this to Date Format - and you are good to go!  

Add whatever extra columns you want to make this a true date table: 

 

amitchandak
Super User
Super User

@thebigwhite , Based on what I got

You can try like

Date =calendar(Min(Table[Date]),Max(Table[Date]))

 

or date =calendarauto()

You can use addcolumns on top of it add other calendar columns


https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.