Downloads
DAXLogicalBeginner

TRUE

Returns the logical value TRUE.

Syntax
TRUE() (also written TRUE without brackets in most places)

Returns: TRUE (a logical value).

What it does

TRUE returns the logical value true. It is a constant, so it does not depend on the data. Its most common use is inside SWITCH, where SWITCH(TRUE(), ...) lets each condition in the list be a full test, not a single value to match. It is also used to set a flag to true in a calculated column.

Syntax and arguments

TRUE takes no arguments. Write TRUE() with brackets, which is clearest. Both TRUE and TRUE() are accepted in most places.

Example

The aging report puts each open invoice in a bucket based on its days past due, and each bucket is a separate test.

Aging Bucket =
SWITCH(
    TRUE(),
    Invoices[DaysPastDue] <= 0, "Current",
    Invoices[DaysPastDue] <= 30, "1 to 30",
    Invoices[DaysPastDue] <= 60, "31 to 60",
    "Over 60"
)

Using TRUE() as the expression tells SWITCH to test each condition in turn. The first condition that is true provides the label, which is the pattern for a rule list.

Example: a second, different use

A flag column set to TRUE when an invoice is past due, used as a filter in a report:

Is Past Due = Invoices[DaysPastDue] > 0

In a calculated column, the test returns TRUE or FALSE for each row. A slicer on this column then filters the invoices that are late.

Things to watch

In business terms

TRUE is used in rule lists, flags and bucket tests that a finance team reads line by line. Its role in a report is structural: it is the anchor that turns a list of conditions into a clear classification.

Related functions

All DAX functions · View as Markdown · DAX fundamentals