Forum Discussion
一棵黄葛树
Helper II
1 year agoDynamic parameter in Power Query
Can a new parameter in Power Query be a dynamic date? Such as: Dynamically return the last month-end date of the month in which today falls: = Date.AddDays(Date.StartOfMonth(DateTime.LocalNow()), -1...
- 1 year ago
Hi 一棵黄葛树,
Thank you for the update. We sincerely apologise for the inconvenience caused.
Please find attached the PBIX file and a screenshot for your reference, which may assist in resolving the issue.
If you find our response helpful, kindly mark it as the accepted solution and consider providing kudos. This will assist other community members facing similar queries.
Thank you.
Omid_Motamedise
Super User
1 year agoYes,
see the following:
let
Today = DateTime.LocalNow(),
StartOfCurrentMonth = Date.StartOfMonth(Today),
LastMonthEnd = Date.AddDays(StartOfCurrentMonth, -1)
in
LastMonthEnd
一棵黄葛树
Helper II
1 year agoThanks, the new query is fine, my need is for new parameters. Or how to set the dynamic date in the parameter?