Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone ,
I want to add a column of dates to a column of numbers in a new column . Thanks !
Solved! Go to Solution.
Hi @Anonymous
In Power Query add a Custom Column with this code
= Date.AddDays([Date] , [Number])
Here's the full example query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtU30zcyMDJW0lEyVYrViVYystA3homYKMXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Number = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Number", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "New Date", each Date.AddDays([Date] , [Number]))
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
Hi @Anonymous
In Power Query add a Custom Column with this code
= Date.AddDays([Date] , [Number])
Here's the full example query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtU30zcyMDJW0lEyVYrViVYystA3homYKMXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Number = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Number", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "New Date", each Date.AddDays([Date] , [Number]))
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
Hi theracy , I have a date column ( dd/mm/yyyy) and i have a numbers columns , i want a new column where it represents the sum of the two columns . For example , i have in date table ( 05/06/2023) and in the numbers column 5 then the result in the column that i want will be 10/06/2023 . if the date is 28/03/2023 and in number column we have 4 then the result will be 01/04/2023 . Thanks
add custom column with this formula
Date.AddDays([column1],[column2])
Hey @aditya0125 ,
You can see in the picture below the result that i wanted ! Thanks
see this result bro.
Bro its MM/DD/YYYY. so it add date not month.
not getting it bro. be more specified.
Hi @Anonymous
Please be a lot more specific about what it is you are trying to do, provide some sampe data, and give an example of the desired result.
Regards
Phil
Proud to be a Super User!
User | Count |
---|---|
92 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |