Forum Discussion
Fairuz
May 23, 2022Copper Contributor
Power Query: Increase date by one day
Hi, I am almost done transforming my data in Power Query but I am stuck at this problem. Screenshot: I am trying to make the dates in the column Date to increase by one day if the time ...
- May 24, 2022
Hi Fairuz
you could add a custom column with this formula:
=if [Time.1]= #time(12,0,0) then Date.AddDays([Date],1) else [Date]
SergeiBaklan
May 24, 2022Diamond Contributor
With same logic as Martin_Weiss suggested you may change date in place adding the step
...
, NextDate = Table.ReplaceValue(
PrevStep
, each [Date]
, each
if [Time] = #time(0,0,0)
then Date.AddDays([Date], 1)
else [Date]
, Replacer.ReplaceValue,{"Date"})
, nextStep = ...