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
KKarlsson
New Member

Start date from end date

Hi.

 

I did my best to wade through the board but could not find, or at least did not understand a way to solve my problem.

I am using a GANTT chart for project follow up and would need to create a column for start dates, which should come directly from end dates of previous project phases. "G" means Gate, so same project will have several Gates and each Gate's start date should be the end date of the previous Gate's end date. I can only get the end date from the data, so start date should be created in PBI.

 

This is what I mean:

Project name & GateEnd dateStart date
Square G11.1.2020X
Square G215.2.20201.1.2020
Square G320.3.202015.2.2020
Square G415.4.202020.3.2020
Square G510.6.202015.4.2020
Round G115.1.2020X
Round G225.1.202015.1.2020
Round G330.3.202025.1.2020
Round G415.5.202030.3.2020
Round G512.6.202015.5.2020
Rectangle G13.3.2020X
Rectangle G212.3.20203.3.2020
Rectangle G325.5.202012.3.2020
Rectangle G415.6.202025.5.2020
Rectangle G515.7.202015.6.2020
  15.7.2020

 

Fields marked with X I would need to look up from other column named "Creation date".

 

Thank you in advance on all input and support. BR,

Karolus

2 ACCEPTED SOLUTIONS
Sujit_Thakur
Solution Sage
Solution Sage

Dear @KKarlsson ,
try this 

Measure=
CALCULATE(
MAXX(Table1,Table1[End date])
,FILTER(Table1,Table1[End date] < EARLIER(Table1[End date])
&& Table1[Project_split] = Earlier[Project_split]
))

keep in mind that you split your project name from project name and gate name 
for this you can go in transform data tab 
dublicate that column and split it and name it as Proj_split


Please give kudos to keep me motivated 
and do accept as solution if you got your answers

ask if any more doubt

Regards 
Sujit

View solution in original post

v-shex-msft
Community Support
Community Support

HI @KKarlsson,

You can try to use following calculate column to extract value from your column as category and lookup the previous date.

StartDate = 
CALCULATE (
    MAX ( T2[End date] ),
    FILTER (
        ALLSELECTED ( T2 ),
        PATHITEM ( SUBSTITUTE ( [Project name & Gate], " ", "|" ), 1 )
            = PATHITEM ( SUBSTITUTE ( EARLIER ( [Project name & Gate] ), " ", "|" ), 1 )
            && [End date] < EARLIER ( T2[End date] )
    )
)

12.png

Notice: end date should be a date type field or the above formula will get the wrong result. you can use custom format on the date field to setting display format.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @KKarlsson,

You can try to use following calculate column to extract value from your column as category and lookup the previous date.

StartDate = 
CALCULATE (
    MAX ( T2[End date] ),
    FILTER (
        ALLSELECTED ( T2 ),
        PATHITEM ( SUBSTITUTE ( [Project name & Gate], " ", "|" ), 1 )
            = PATHITEM ( SUBSTITUTE ( EARLIER ( [Project name & Gate] ), " ", "|" ), 1 )
            && [End date] < EARLIER ( T2[End date] )
    )
)

12.png

Notice: end date should be a date type field or the above formula will get the wrong result. you can use custom format on the date field to setting display format.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Sujit_Thakur
Solution Sage
Solution Sage

Dear @KKarlsson ,
try this 

Measure=
CALCULATE(
MAXX(Table1,Table1[End date])
,FILTER(Table1,Table1[End date] < EARLIER(Table1[End date])
&& Table1[Project_split] = Earlier[Project_split]
))

keep in mind that you split your project name from project name and gate name 
for this you can go in transform data tab 
dublicate that column and split it and name it as Proj_split


Please give kudos to keep me motivated 
and do accept as solution if you got your answers

ask if any more doubt

Regards 
Sujit
amitchandak
Super User
Super User

@KKarlsson , based on what I got you need to calculate the start date

 

start date = maxx(filter(Table, [Project name] = earlier([Project name]) && [End date] <earlier([End date])),[End date])

Hi,

Sorry to resurrect an old forum but how would you go about this if you had the start date and wanted to calcutate the end date?

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.