Some tips for filtering dates in D365FO
Hylke Britstra
Microsoft MVP for AI ERP / Trainer & Consultant & Manager Innovation D365 FO at Mprise
By working with D365FO you often need date filters for making selections of data. In my trainings and consultancy projects I see that not all users now the several available options. So to help a bit I share three examples in this article:
1. Using the D or T in the Date field
In filters you can use the criteria D (session date) or T (actual date) in the date field:
This value will always filter on the 'today' date. In this example I have entered the value T in the voucher transactions inquiry. The result of the value is that I will only see the voucher transactions posted today:
When I use the same filter tomorrow I will only see transactions of August 5, no need to change the filter for that or enter each date every day. Because of this standard value I don't need to specify the date every time when I want to use this filter if I want only data of today.
2. Using the advanced date queries
For some purposes it can be that you want to see data of the last X amount of days or the next X amount of days. That can be for manually tasks, but also in batch jobs. In that case you can use the advanced date queries.
By example if I want to see all posted transactions of the last 30 days, I can use the following DayRange filter:
With this criteria in the voucher transactions inquiry, I will see the posted transactions of the last 30 days (including today):
There are multiple options for date/day ranges in the advanced date queries, so for more possibilities and examples see the official Microsoft page with the filter options: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/get-started/advanced-filtering-query-options
领英推荐
3. Date intervals
In some functionalities and reports you have the field Date interval available, by example in the trial balance:
You have two options then:
So the date intervals can enter the From date and To date automatically. For doing this, you can set up the selections that you want to use in each date interval. By example I can make a date interval for the current period where I define that I want a date range for the financial period. When I select this date interval, the date selection will always be the dates of the current period based on the session date. In my case on August 4, the From date and To date will be for the month August:
When the session date will be changed to a new period because the new period started or you change the session date manually, automatically the date selection will be changed to the new period based on this entered date interval. So when I change my session date to a date in September and open the trial balance again, the From date and To date are automatically changed to September:
You can create as many date intervals as you need. In each date interval you define the starting date of the date selection and the ending date of the date selection. By example the date interval for current period will be created with the options to begin at the start of the From date period type 'Period' and stop at the end of the period:
The system will fall back on the fiscal calendar and recognizes the periods. So with that you can also make a date interval where the presented data is based on year to date.
By opening the trial balance you always see the From date and To date related to year to date (tomorrow the To date will be changed automatically to August 5th):
Hope this helps!
D365 F&O (ERP) SCM, Manufacturing, Warehouse
11 个月Amazing!!!
IT Dynamics 365 Application Manager at Matthew Algie
1 年Hi Hylke, thanks for the post. I am looking to filter records created more than half an hour from 'now' relative to when filtered. I am aware of the (LessThanUtcNow()) but do you know we can add time-windows into the brackets, as we do with the DayRange function, and if so what would be the format? On this occasion the filter being applied is to a batch job parameter.
Digital Transformation Enabler | Driving I.T Enabled Business Processes
2 年Asif Fattah Manzoor Hussain Muhammad Saad Khurshid
Microsoft Dynamics 365 - ERP Unit Manager
2 年Very helpful