How to filter a dynamic date range in Microsoft Dynamics AX

December 7 2016

Filtering transactions like Purchase orders or Sales orders on a date range is a standard requirement.

I want to see the Purchase/Sales orders that are to be received/shipped today, or in the next x days.

Instead of typing specific calendar dates in our filter (which will certainly work), we would want to enter a date range that adjust itself automatically as time progresses.

Here are two ways of date filtering that work perfectly.

1. Use the letter "T" or "t" for a dynamic "today" filter.

Dynamic date range - T for today forward
First we click on the filter symbol in the left margin of "All Purchase orders" and we "add a filter field". Now we enter the letter "T" or "t" in the "Delivery date" to see all PO's to be received after today.


Dynamic date range - Delivery date

2. Use the command (dayRange(-3,7)) to filter transactions with a delivery date between 3 days before today and 7 days after today. Make sure to use "matches." In the below example, we use the range 10 days before today and 10 days after.

Dynamic date range command 


That is all.

FREE Membership Required to View Full Content:

Become a MemberLogin
Joining gives you free, unlimited access to news, analysis, white papers, case studies, product brochures, and more, and it’s all FREE. You’ll also have the option to receive periodic email newsletters with the latest relevant articles and content updates. Learn more about us here
About Evert Bos

I am Evert J Bos, ERP consultant since 1986. I started in Europe with IMS7 (A Honeywell Bull Mainframe ERP system) and the BaaN ERP system. Since 1995 I have worked in the USA and since 2004 I have been working with Dynamics AX.  I work for Sikich and focus mostly on manufacturing companies that make complex, engineered products.

More about Evert Bos