Forum Discussion
How to create dynamic date paramters in power query
Hi,
I have paramter in the power query
We are going to pull the data based on the date we enter in the paramter,
I want to make this as dynamic should pull the latest date data from a table, some latest dateshaving data some dates no data is pulled so we need to pull only the latest date data in power.
Can we achieve this requirement?
Thanks,
SBC
3 Replies
- ppm1Solution Sage
Yes. You can use Date.From(DateTime.LocalNow()) to use today's date in any expression (or used Date.AddDays() to shift from that. Or you can use the Table.Max() function to keep only the rows for the max date from a given table.
Pat
- ppm1Solution Sage
I should have mentioned that I was suggesting you not use a parameter but use those dynamic functions in your query/expression. If you give more details and maybe mock data from your scenario, the community will give a more detailed response.
Pat