7 Replies Latest reply on Nov 22, 2018 6:26 PM by Paul Wachtler

Identifying a field using start and end date only

I have a scenario where I want to do  something like this,

If task name = 'GHI' then check the predecessor task name and if that is def then 1 else 0..I have to build this calculation based on the start and end date only.Sample data is attached

• 1. Re: Identifying a field using start and end date only

Hi Aman,

Thanks

Deepak

• 2. Re: Identifying a field using start and end date only

Hi Amandeep,

Based on your sample data, and my assumption that I believe you want to make sure that the start and end date are the same for the tasks you're comparing, you can use a calculation like this:

if max([taskname]) = "ghi" then and

lookup(max([startdate]),-1) = max([startdate]) and lookup(max([enddate]),-1) = max([enddate]) and

then 1 else 0

end

Make sure it calculates using table (down)

Best,

Paul

• 3. Re: Identifying a field using start and end date only

Hi Deepak. I don;t see any attachment.

• 4. Re: Identifying a field using start and end date only

Hi Paul. the start date of task name 'GHI' should be greater than the end date of the previous task(DEF). I can do the max of the task name but the same task name occurs multiple times and each time it can have a different predecessor

• 5. Re: Identifying a field using start and end date only

Right, so you didn't explain any of that in your original post.  I took a guess at your original requirements, but without you explaining in detail what you are looking to do, and what you've tried so far, I have no way of knowing.

Your best best for getting this solved it to share a workbook with how your data is structured, and tell us what you've tried, and include a mockup of what you want the solution to look like.  Otherwise we won't know how to help you.

• 6. Re: Identifying a field using start and end date only

Hi Paul,

• 7. Re: Identifying a field using start and end date only

Ok, that makes sense.  Thanks for explaining in detail and sharing the screenshot.

To recap what you're looking to do, for tasks labelled "Aman", look at the previous task.  Check if the Aman task assigned date is the same or greater than the previous task.  If it is, and the previous task is "Testing" then return "Testing" or if it's "Post Production" then return "Production".

You can do that like this:

if lookup(attr([Task Title]),-1) = "Testing" then "Testing"

elseif lookup(attr([Task Title]),-1) = "Post Production" then "Production"

end

end

Let me know if that works for you.  If you get an error when trying it, please take a screenshot of the error so I can help troubleshoot.

Best,

Paul