Forum Discussion
henrycqc
Helper II
4 years agoInclude only Latest 3 months of data
In power query, I want to limit the amount of data loaded into the model by only including new data within the last 3 months from a dataflow. So far found this YouTube video “ https://youtu.be/zr52Q...
- 4 years ago
Based on your initial example code:
let Source = Dates, #"Filtered Rows" = Table.SelectRows(Source, each [dates] >= Date.AddMonths(Date.From(DateTime.LocalNow()), -3)) in #"Filtered Rows"Substitute [dates] here with whatever the date field in your fact table is called.
Pete
CNENFRNL
Community Champion
4 years agolet
Today = Date.From(DateTime.LocalNow()),
#"3m Ago" = Date.AddMonths(Today, -3),
Dates = Table.FromList(
List.Dates(#"3m Ago", Duration.Days(Today - #"3m Ago"), #duration(1,0,0,0)),
Splitter.SplitByNothing(),
{"Date"}
)
in
Dates