Forum Discussion

EZam86's avatar
EZam86
New Member
2 years ago
Solved

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!

  • 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.

1 Reply

  • vgarciasouza's avatar
    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.