ISAFTER

Updated on

ISAFTER is a DAX function that returns TRUE if the first set of values occurs strictly after the second set of values.

Syntax

ISAFTER(
   [ Value1, ... ],
   [ Value2, ... ],
   [ Order, ... ]
)
Argument Properties Description
Value1 Repeatable Expression to be compared with second parameter.
Value2 Repeatable Expression to be compared with first parameter.
Order Optional, Repeatable The order to be applied. 0/FALSE/DESC – descending; 1/TRUE/ASC – ascending.

Return Values

True or false.

Remarks

This function is similar to ISONORAFTER. The difference is ISAFTER returns true for values sorted strictly after the filter values, where ISONORAFTER returns true for values sorted on or after the filter values.

This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

Table name: ‘Info’

Country/Region State Count Total
IND JK 20 800
IND MH 25 1000
IND WB 10 900
USA CA 5 500
USA WA 10 900

The following expression:

FILTER (
    Info,
    ISAFTER (
        Info[Country], "IND", ASC,
        Info[State], "MH", ASC )
)

Returns:

Country State Count Total
IND WB 10 900
USA CA 5 500
USA WA 10 900

Other functions related to ISAFTER are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/isafter-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy