Forum Discussion
Jaxon
8 years agoFrequent Visitor
New Column With Date (No other dates in source)
Hoping this isn't a complete noob question.... I have a data source (Excel file) that contains data but has no DATES Column to extract from. In the Query Editor I'd like to: 1. Add a new col...
- 8 years ago
Hi Jaxon,
You could create a calculated column in Data view in Power BI Desktop by Today().
Best Regards
Cherry
- 8 years ago
Jaxon- Here is a very basic example:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Refresh", each DateTime.LocalNow()) in #"Added Custom"
Greg_Deckler
Community Champion
8 years agoJaxon- Here is a very basic example:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Refresh", each DateTime.LocalNow())
in
#"Added Custom"Jaxon
8 years agoFrequent Visitor
Thanks much! Working through it now.
Sadly I have a dreaded refresh error I am trying to squash as well. (Fixed)