Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 @Anonymous,
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 @Anonymous,
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))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |