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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bhelou
Responsive Resident
Responsive Resident

Previous Month And Previous Quarter

Hello , 
I have Dates table in Power Query , i need to add 2 new columns extracted from the date column , 
Column 1 : Start of previous month
Column 2 : Start of Previous Quarter

 

I need the previous Month and Quarter ,

Like the first cell to give me 01-Dec-97 and so on 

 

Many Thanks 12333.png

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

For previous Start of month

 

= Date.StartOfMonth(Date.AddMonths([Date],-1))

 

For previous start of quarter

 

= Date.StartOfQuarter(Date.AddQuarters([Date],-1))

 

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @bhelou 

 

You can also try to solve the problem with DAX.

Column:

Start of Month = STARTOFMONTH('Table'[Date])
Start of previous month = EDATE([Start of Month],-1)
Start of Quarter = STARTOFQUARTER('Table'[Date])
Start of Previous Quarter = EDATE([Start of Quarter],-3)

vzhangti_0-1654051342263.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Vijay_A_Verma
Super User
Super User

For previous Start of month

 

= Date.StartOfMonth(Date.AddMonths([Date],-1))

 

For previous start of quarter

 

= Date.StartOfQuarter(Date.AddQuarters([Date],-1))

 

Thank you worked  , Thanks for help 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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