Forum Discussion
1Kash
2 years agoNew Member
Query Last 100 Days for Past 3 Years
Greetings All, I'm looking to set up a daily query that will pull the last 100 days from TODAY, for the current-year, prior-year and prior-prior-year periods. The date ranges would look somet...
- 2 years ago
Construct the periods by yourself (take 5 days for example)
let Source = let today=Date.From(DateTime.LocalNow()) in List.Accumulate({0..2}, {}, (s,c) => s & List.Dates(Date.AddYears(today, -c), 5, #duration(-1,0,0,0))) in Source
ThxAlot
2 years agoSuper User
Construct the periods by yourself (take 5 days for example)
let
Source = let today=Date.From(DateTime.LocalNow()) in List.Accumulate({0..2}, {}, (s,c) => s & List.Dates(Date.AddYears(today, -c), 5, #duration(-1,0,0,0)))
in
Source
1Kash
2 years agoNew Member
This worked great. Thanks a lot, ThxAlot