Power Query: Date + Number of Days Not working in formula

robtops

New Member
Joined
Sep 23, 2014
Messages
8
Morning, I've just started using power query which looks like being a really useful tool.

I'm preparing a dataset ready for use in a Power Pivot model.

As part of this I've added a number of calculated columns but am having trouble getting one of these to work.

Its pretty basic and is adding an existing date to a number of days column (=[Bill_Date] + [Payment_Terms]). In Excel this gives me a new date but in Power Query I'm getting this error:

We cannot apply operator + to types date and Number

Any ideas as to how I go about achieving what I'm after with Power Query?

Thanks very much and if you need any more info let me know
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi robtops,
Power Query is fussy about types and won't let you simply add a Date and an Integer.
The function Date.AddDays should do the trick. Something like
Date.AddDays([Bill_Date], [Payment_Terms])
 
Upvote 0

Forum statistics

Threads
1,215,376
Messages
6,124,594
Members
449,174
Latest member
chandan4057

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top