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
Anders_G
Helper I
Helper I

Help with M expression - Create custom column based on Date

Hi,

 

I need help writing an M expression for a custom column in Power Query

 

I have a column with dates called "Initial Date". Depending on the quarter in which the date falls I want to create a new custom column "Desired Date" that gives the first day of the next quarter. Quarters are running from Jan-Mar etc. In the example below 2022-01-01 should return 2022-04-01 and 2022-05-03 should return 2022-07-01.

 

Anders_G_0-1659605275892.png

 

Thank you!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anders_G , Try one of the two in power query as a new column

 


Date.AddQuarters([Column],1)

 

 

Date.StartOfQuarter(Date.AddQuarters([Column],1))

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
amitchandak
Super User
Super User

@Anders_G , Try one of the two in power query as a new column

 


Date.AddQuarters([Column],1)

 

 

Date.StartOfQuarter(Date.AddQuarters([Column],1))

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

That worked very well. Thank you very much!

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.