Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Sorry if this was asked previously I couldn't find it. My end goal is to display the date we will run out of a material. I basically have a column that contains today date and another column with a # of Days we have on hand. Currently getting error expression.error The number is out of range of a 32 bit interger value.
Solved! Go to Solution.
Hi, @Anonymous ;
You could add custom column such as:
Date.AddDays([Date],[days])
Or
[Date]+#duration([days],0,0,0)
The final show:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtQ11DVS0lEyNFCK1QGLGOka65oBRYyQRCx1gfI6SsZAoVgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, days = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"days", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Date.AddDays([Date],[days])),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each [Date]+#duration([days],0,0,0))
in
#"Added Custom1"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could add custom column such as:
Date.AddDays([Date],[days])
Or
[Date]+#duration([days],0,0,0)
The final show:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtQ11DVS0lEyNFCK1QGLGOka65oBRYyQRCx1gfI6SsZAoVgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, days = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"days", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Date.AddDays([Date],[days])),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each [Date]+#duration([days],0,0,0))
in
#"Added Custom1"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I understand in basic terms what you are trying to do. Add a number of days (in a column) to a date from another column. That's why I showed the function AddDays.
If there is a problem with "# of days" being null or zero then show me what you have and what you want the desired result to be
Sorry I am very new user. I tried that but the # isn't consistant. I actually want the date column (9/13/2022) to get added to a column that has the # of days (for example, 3) I want it to display 9/16/2022 but not every row will have contact number (like 3)
Are you using the Date.AddDays function?
e.g. Date.AddDays(#date(2011, 5, 14), 5)
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.