Forum Discussion
ColinCowan
3 years agoHelper I
Replace Numbers with Date Sequencial
Hi, hoping someone can help my aim is to replace the numbers with the specified date after each date change.
- 3 years ago
Hi, thanks that works and easier much appreciated.
Regards Colin
- 3 years ago
Hi ColinCowan ,
My pleasure!
If it works, would you mind accept it as solution? Then more people who have the same requirment will find the solution quickly and benefit here, thank you!
Best Regards,
Community Support Team _ kalyj
Greg_Deckler
3 years agoCommunity Champion
ColinCowan You can do this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjTSNzbUN7SwtFQwsjI1tTIwUAjwVYrVAcqASSMwaQ4mjcGkCZg0BZMWYNIMiUQyz9jKGNk8iA5DUySjDCF6LGHmxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Column2", each try DateTime.FromText([Column1]) otherwise null),
#"Filled Down" = Table.FillDown(#"Added Custom",{"Column2"}),
#"Removed Columns" = Table.RemoveColumns(#"Filled Down",{"Column1"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Column2", "Column1"}})
in
#"Renamed Columns"