Forum Discussion
Calculate difference of dates in rows
I have a table that consists of many job numbers, activity name, and dates. Every job is listed twice because we are only looking at two activity names: Final Closing Walkthrough & Foundation - Concrete. I need to calculate the days from Base End Date (Concrete) to Base End Date (Closing). This is an example of one specific job
4 Replies
- AnonymousNot applicable
you want to do in PowerQuery, look at Pivot and make Job 1-110-110 one row with ActivityName values used as a new column like (Final Closing Walkthru and Foundation - Concrete as column names as well as Base End Date and Act End Date. Then you can do a DateDiff between the date columns
- AnonymousNot applicable
Pivot job creates every job as a new column. Pivoting other columns makes the values 1 or 0. I might be misinterpreting your response
- AnonymousNot applicable
I was able to get my solution goign a different route. I did
Base DIP = DATEDIFF(CALCULATE(MAX('Concrete - Closing DIP'[BaseEndDate]),'Concrete - Closing DIP'[ActivityName]="Foundation - Concrete"),CALCULATE(MAX('Concrete - Closing DIP'[BaseEndDate]),'Concrete - Closing DIP'[ActivityName]="Final Closing Walkthrough"),DAY)- AnonymousNot applicable
Hi, Anonymous
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Yongkang Hua