Forum Discussion
Refresh M Query - Correct Syntax For Dates
- Anonymous2 years ago
Hi Anonymous ,
Please try this:let Source = YourTableName, // Replace with your actual data source CurrentDate = DateTime.From(DateTime.Date((DateTime.LocalNow()))), StartDate = DateTime.From((Date.AddDays(CurrentDate, -90))), FilteredRows = Table.SelectRows(Source, each [datetime] >= StartDate and [datetime] < Date.AddDays(CurrentDate,1)) in FilteredRowsBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Anonymous ,
Please try this:
let
Source = YourTableName, // Replace with your actual data source
CurrentDate = DateTime.From(DateTime.Date((DateTime.LocalNow()))),
StartDate = DateTime.From((Date.AddDays(CurrentDate, -90))),
FilteredRows = Table.SelectRows(Source, each [datetime] >= StartDate and [datetime] < Date.AddDays(CurrentDate,1))
in
FilteredRows
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group