Forum Discussion
Subset of dates from a table using Power query
- 1 year ago
Hello Judy,
You can try below M script
let
Today = Date.From(DateTime.LocalNow()),
StartDate = Date.StartOfMonth(Date.AddMonths(Today, -26)),
DateList = List.Dates(StartDate, Duration.Days(Today - StartDate) + 1, #duration(1,0,0,0)),
DateTable = Table.FromList(DateList, Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error)
in
DateTable
Thanks,
PankajIf this solution helps, please accept it and give a kudos, it would be greatly appreciated.
Hello Judy,
You can try below M script
let
Today = Date.From(DateTime.LocalNow()),
StartDate = Date.StartOfMonth(Date.AddMonths(Today, -26)),
DateList = List.Dates(StartDate, Duration.Days(Today - StartDate) + 1, #duration(1,0,0,0)),
DateTable = Table.FromList(DateList, Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error)
in
DateTable
Thanks,
Pankaj
If this solution helps, please accept it and give a kudos, it would be greatly appreciated.