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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
koiralasmn
Frequent Visitor

Dynamic Date Range in Power Query

Hi,

 

For the calendar table in my project, I have been doing this in different queries.

 

 

= List.Min(#"Extracted Time"[Date])

= Date.AddDays(List.Max(#"Extracted Time"[Date]),1)

= {Number.From(#"MinDate")..Number.From(#"MaxDate")}

 

 

Is there a way to get the Calendar ranging from Min to Max using a single query?

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

= List.Generate(() => MinDate, each _ <= MaxDate, each Date.AddDays(_, 1))

View solution in original post

1 REPLY 1
AlienSx
Super User
Super User

= List.Generate(() => MinDate, each _ <= MaxDate, each Date.AddDays(_, 1))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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