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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EZam86
New Member

Power Query EndDate-StartDate > 2 years

Hi,

 

I have a Power Query which produces an expanded list of information and in that information I have dates from the start and end date columns in my table. Im trying to creat a formula to work and I cant figure out how.

 

if EndDate - StarDate > 2 years if yes then mark column G as continue else - start

 

This means that the end date and Start date is greater than 2 years if yes then mark or edit a specific column as Continue or Start 

 

Any ideas greatly appreciated!

1 ACCEPTED SOLUTION
vgarciasouza
Frequent Visitor

an you create a custom column with the formula:

 

if Duration.Days([endDate] - [startDate]) > (365 * 2) then "continue" else "start"

 

and then filter the ones that you need.

View solution in original post

1 REPLY 1
vgarciasouza
Frequent Visitor

an you create a custom column with the formula:

 

if Duration.Days([endDate] - [startDate]) > (365 * 2) then "continue" else "start"

 

and then filter the ones that you need.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Carousel June 2024

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

2
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors