Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, hoping someone can help my aim is to replace the numbers with the specified date after each date change.
Solved! Go to Solution.
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, I adde a custom column copy pasted the formula and ended up with this. Please rememer I am a complete novice.
@ColinCowan I'll walk you through it.
Greg
See result
@ColinCowan Apparently there are extra spaces or something in there. Delete [Column1 - Copy] in your formula and leave your cursor at right after the (. Double-click your column in the Available columns section. Click OK.
Greg, I tried this also
Greg
Error code
@ColinCowan No, that's not the formula I posted, the formula for your added column is:
try DateTime.FromText([Column1 - Copy]) otherwise null
Your added column formula is literally not that. At all. Your formula doesn't include the try statement or the otherwise. See PBIX attached below signature.
Greg
Thanks Can I reset as I am now confussed should the formula be
Hi @ColinCowan ,
Another way maybe easy to understand for you.
1.Select the column then click Data Type option.
2.Select Date/Time.
3.Then you will find the numbers return error, right-click the column and select Replace Errors.
4.Enter null in the dialog.
5.Select the column, then click Fill Down.
Result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks that works and easier much appreciated.
Regards Colin
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
@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"
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |