How to filter a dynamic date range in Microsoft Dynamics AX

Reading Time: 1 minute


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 adjusts 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.

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.

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.







This publication contains general information only and Sikich is not, by means of this publication, rendering accounting, business, financial, investment, legal, tax, or any other professional advice or services. This publication is not a substitute for such professional advice or services, nor should you use it as a basis for any decision, action or omission that may affect you or your business. Before making any decision, taking any action or omitting an action that may affect you or your business, you should consult a qualified professional advisor. In addition, this publication may contain certain content generated by an artificial intelligence (AI) language model. You acknowledge that Sikich shall not be responsible for any loss sustained by you or any person who relies on this publication.


Join 14,000+ business executives and decision makers

Upcoming Events

Upcoming Events

Latest Insights

About The Author