Forum Discussion
mdrammeh
9 years agoHelper III
How to Counting Date values Backwards
I have a date column titled "Scheduled Start Date" for millions of columns in Power Query. I want to calculate the number of days prior to the "Schedule Start Date". I tried to formulas for the resu...
v-qiuyu-msft
9 years agoCommunity Support
Hi mdrammeh,
The syntax of the Date.AddDays() function is Date.AddDays(dateTime, days as number), so you need to modify the expression like this Date.AddDays([Scheduled Start],-27).
As you mentioned you want to calculate the number of days prior to the "Schedule Start Date", I guess the Duration.TotalDays should be more proper, see: DATEDIFF in Power Query.
Best Regards,
Qiuyun Yu