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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
lboldrino
Resolver I
Resolver I

How Create List.Dates(#date(2020, 01, 01), to firs day from last month

I try to create this Date-Table...

it musst to able add every new month, the last month to date table.

 

firstOfPeriode

01.01.2020
01.02.2020
01.03.2020
01.04.2020
01.05.2020
01.06.2020
01.07.2020
01.08.2020

 

=List.Dates(#date(2020, 01, 01), (?????))

Thnx or any Idea!

 

 

 

 

1 ACCEPTED SOLUTION

works perfect!

Thanx!

 

= List.Dates(#date(2020, 01, 01), Duration.Days(Duration.From(DateTime.Date(Date.StartOfMonth(DateTime.LocalNow())) - #date(2020, 01, 01))), #duration(1, 0, 0, 0))

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@lboldrino ,

something like this

List.Dates(#date(2020, 01, 01), Duration.Days(Date.StartOfMonth(DateTime.LocalNow()) - #date(2020, 01, 01)), #duration(1, 0, 0, 0))

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

lboldrino_0-1600151906993.png

😞

 

works perfect!

Thanx!

 

= List.Dates(#date(2020, 01, 01), Duration.Days(Duration.From(DateTime.Date(Date.StartOfMonth(DateTime.LocalNow())) - #date(2020, 01, 01))), #duration(1, 0, 0, 0))

Greg_Deckler
Community Champion
Community Champion

@lboldrino So you want to get the Date.Month of your max value, subtract that from the Date.Month of your min value and use that as your 2nd parameter, with a third parameter of 1?

 

Is that correct?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

no. i want to create a simple datet table... start. 01.01.2020 to first day of ast month.

Hi @lboldrino ,

 

Refer following article on creating a Date table in Power BI Query Editor section:

https://radacad.com/all-in-one-script-to-create-date-dimension-in-power-bi-using-power-query

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.