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

Create a custom column with a date based on another columns date

How do I write a formula that creates a new column that takes a range of dates and delivers a new date?

 

The dates on the left are the ones that I have. I want to create a custom column with the starting date of the next quarter, based on the "Initial date" column. So whichever quarter the "Initial date" falls within the custom column will provide the first day of the next quarter. Q1 = Jan-Mar, etc.

 

The custom column needs to be visible in Power Query.

 

Anders_G_0-1659534249233.png

 

Thank you

 

1 ACCEPTED SOLUTION

@Anders_G , Try in power query like

 


Date.AddQuarters([Column],1)

 

or

 

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

 

If this works, Mark as a solution

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anders_G , Try a new column

eomonth([Date],if( mod(Month([Date]),3) =0,0,3-1*mod(Month([Date]),3)))+1

Ran in to a problem. I wasn't aware of at the time of writing my initial question. But I need the custom column created to be visible in Power Query. Unfortunately this calculated DAX column is not visible.

@Anders_G , Try in power query like

 


Date.AddQuarters([Column],1)

 

or

 

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

 

If this works, Mark as a solution

That's brilliant. thank you!

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.