Forum Discussion
Anonymous
4 years agoNot applicable
Check Date if Falls from previous and current month dates
Hello, Im just having a hard time how to come up the results. I have column date, i wanted to check if it falls from date range 26th from previous month until 25th of the current month. ...
- 4 years ago
Use this formula in a custom column
= Date.ToText(Date.AddDays([Date],-25),"MMM")See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ3MtU3MjAyUorVAfPMEDwjfVNkjgkyxwhFClWXkTmCZ4yi0hihMhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}), #"Added Custom1" = Table.AddColumn(#"Changed Type", "Month", each Date.ToText(Date.AddDays([Date],-25),"MMM"), type text) in #"Added Custom1"
Vijay_A_Verma
Most Valuable Professional
4 years agoUse this formula in a custom column
= Date.ToText(Date.AddDays([Date],-25),"MMM")See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ3MtU3MjAyUorVAfPMEDwjfVNkjgkyxwhFClWXkTmCZ4yi0hihMhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type", "Month", each Date.ToText(Date.AddDays([Date],-25),"MMM"), type text)
in
#"Added Custom1"