Forum Discussion
Adding Days to current date
- Anonymous5 years ago
You could add a column. Say your last step name is FinalStep, and your days on hand field is DaysOnHand:
CurrentDate= Date.From(DateTime.LocalNow()),
NewColumn = Table.AddColumn(FinalStep, "OutOfStockDate", each Date.AddDays(CurrentDate, [DaysOnHand]))This will add the amount of days from DaysOnHand to today's date.
--Nate
You could add a column. Say your last step name is FinalStep, and your days on hand field is DaysOnHand:
CurrentDate= Date.From(DateTime.LocalNow()),
NewColumn = Table.AddColumn(FinalStep, "OutOfStockDate", each Date.AddDays(CurrentDate, [DaysOnHand]))
This will add the amount of days from DaysOnHand to today's date.
--Nate
So I have created to column "Current Date" but when I try your recommended solution to add to that colum the number of days til out I get an error. Seems to be with FinalStep. I do not understand why. Is this just to name the column or to provide a calucalated function? What is the function of FinalStep?