Forum Discussion
Dates Clarification
- 3 years ago
here are some information for your reference
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQHQktLM6VYHRDHCMExgsiY4+RYgDnGcE4sAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]), #"Replaced Value" = Table.ReplaceValue(Source,"1996","2005",Replacer.ReplaceText,{"date"}), #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"date", type date}}) in #"Changed Type"Solved: Change years in a Date column in Query Editor - Microsoft Power BI Community
=if [Release date] < #date(2020, 1, 1) then 1 else if [Release date] > #date(2019, 12, 31) and [Release date] < #date(2021, 1, 1) then 2 else if [closed date] < #date(2021, 1, 1) then 3 else 0Solved: Power query - if function with dates - Microsoft Power BI Community
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
here are some information for your reference
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQHQktLM6VYHRDHCMExgsiY4+RYgDnGcE4sAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"1996","2005",Replacer.ReplaceText,{"date"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"date", type date}})
in
#"Changed Type"
Solved: Change years in a Date column in Query Editor - Microsoft Power BI Community
=if [Release date] < #date(2020, 1, 1) then 1
else if [Release date] > #date(2019, 12, 31) and [Release date] < #date(2021, 1, 1) then 2
else if [closed date] < #date(2021, 1, 1) then 3
else 0
Solved: Power query - if function with dates - Microsoft Power BI Community
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thanks so much I have this working now was struggling to find the appropriate historical forum thread! 🙂