cancel
Showing results for
Did you mean:
Helper I

## Calculate task end date from task start date and project wise

Hey Community,

I am creating a milestone tracker, and I need little help here:

 Project Task Task Start Date Task End Date P1 T1 12/2/21 15/2/21 P1 T2 15/2/21 15/2/21 P2 T1 12/3/21 15/3/21 P2 T2 15/3/21 20/3/21 P2 T3 20/3/21 20/3/21

I need to work on the DAX function that will automatically calculate the task end date with the next task start, and if the project change, it will consider the task start date as the end date.

1 ACCEPTED SOLUTION
Responsive Resident

Here is an alternative adapted from @amitchandak

```EndDate_V2 =
MINX (
FILTER (
),
)
RETURN
6 REPLIES 6
Responsive Resident

Here is an alternative adapted from @amitchandak

```EndDate_V2 =
MINX (
FILTER (
),
)
RETURN
Helper I

It worked, thank you so much to help.

Responsive Resident

Here is a tentative solution as a calculated column

```EndDate =
VAR Result =
CALCULATE (
FILTER (
)
)
RETURN

Let us know if that works for you

David

Super User

@shefalinishad11 , Th logic I applied, If in the smae project I get next date, That will end date of this step, else start date and enddate.

Can you copy paste data from excel. It coming all in one line

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
Super User

@shefalinishad11 , Try a new column like

New column =
return

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
Helper I

Hi @amitchandak ,

Thanks for looking out.

The column work but it showing the start date in the end date column. It supposed to pick the start date of the next task as the end date for that particular project. If the project last task then the end date should be the same as the start date. Sharing screenshot.

Task End Date = Var _min = MAXX(FILTER('Table 1','Table 1'[Project] = EARLIER('Table 1'[Project])&&'Table 1'[Task Start Date]> 'Table 1'[Task Start Date]),'Table 1'[Task Start Date])
return

Announcements