I'm using List.Dates to create a list of future dates within the query editor. Is there a way I can make the line below dynamic to have the starting date be whatever today's date is?
= #"Future Date List"(#date(2019, 2, 22), 730, #duration(1, 0, 0, 0))
Solved! Go to Solution.
Hi @nobodyukno,
try following PowerQuery query. It creates the start date from parts of your local DateTime.
= List.Dates(#date(Date.Year(DateTime.LocalNow()), Date.Month(DateTime.LocalNow()), Date.Day(DateTime.LocalNow())), 730, #duration(1, 0, 0, 0))
Use DateTime.LocalNow() to get today's date. Equivilant to TODAY() in Excel or DAX. You may need to wrap it in DateTime.Date() to just get the date, so the entire function might be:
= #"Future Date List"(DateTime.Date(DateTime.LocalNow()), 730, #duration(1, 0, 0, 0))
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @nobodyukno,
try following PowerQuery query. It creates the start date from parts of your local DateTime.
= List.Dates(#date(Date.Year(DateTime.LocalNow()), Date.Month(DateTime.LocalNow()), Date.Day(DateTime.LocalNow())), 730, #duration(1, 0, 0, 0))