Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |