Skip to content

Filters and tokens

A measure’s Filter Expression is a list of Field=Filter pairs separated by semicolons:

Open=Yes;Due Date=..{TODAY-1D};Salesperson Code={SALESPERSON}
  • Field names can be the field’s name or its caption. Case doesn’t matter.
  • Filters use normal Business Central filter syntax: >0, Open|Released, <>'', A*, 10000..20000.

Tokens are replaced when the value is calculated, so one measure keeps working as time passes and gives each user their own figures.

Token Becomes
{TODAY} Today’s date
{WORKDATE} The work date
{TODAY-30D}, {TODAY+1W}, {TODAY-1Y} Any Business Central date formula added to today
{TODAY-CM} The start of the current month
{TODAY+CM} The end of the current month
{WORKDATE-1M} and so on The same date formulas, from the work date
Token Becomes
{USERID} The user the value is calculated for
{SALESPERSON} That user’s Salespers./Purch. Code from User Setup
{PURCHASER} The same code; easier to read on purchase filters

A measure that uses a user token is personal: one setup gives every user their own figure. It’s also secure by default: a user without a salesperson code sees 0, never someone else’s numbers.

Token Becomes
{Rec.FieldName} or {Rec."Field Name"} A field of the record on screen

{Rec.…} tokens are used in Per Record measures, which have a Record Table. A blank field matches blank.

You want Filter
Overdue open customer entries Open=Yes;Due Date=..{TODAY-1D}
Posted this month Posting Date={TODAY-CM}..{TODAY}
Posted in the last 30 days Posting Date={TODAY-30D}..{TODAY}
My open sales orders Document Type=Order;Status=Open;Assigned User ID={USERID}
My customers Salesperson Code={SALESPERSON}
My open purchase orders Document Type=Order;Status=Open;Purchaser Code={PURCHASER}
Open orders for this customer (Record Table: Customer) Document Type=Order;Sell-to Customer No.={Rec.No.}
Overdue entries for this customer (Record Table: Customer) Customer No.={Rec.No.};Open=Yes;Due Date=..{TODAY-1D}
Other open orders for this order’s customer (Record Table: Sales Header) Document Type=Order;Sell-to Customer No.={Rec.Sell-to Customer No.};No.=<>{Rec.No.}