ISAFTER
Whether a list of values comes after another, pair by pair, in the order given (as START AT does).
Group: Information. Compatible with DAX.
Syntax
ISAFTER ( <value1>, <value2> [, <order>] [, <value1>, <value2> [, <order>] ] … )
| Parameter | Type | Description |
|---|---|---|
value1 | Value repeatable | A value of the row being tested, usually a column in a row context. |
value2 | Value repeatable | The value it is compared with, such as a constant. |
order | Keyword optional, repeatable | ASC (ascending, when left out) or DESC (descending): the order of this pair; 1 or TRUE, 0 or FALSE say the same, and any other value is an error. Between two pairs it may be left empty, with nothing between the commas: ASC. |
Returns
Boolean. TRUE when the first values come strictly after the second ones, in the order given.
Remarks
- The pairs are compared one after another, as a sort on several columns does: the first pair decides, unless its two values are equal; then the next pair decides, and so on. When every pair is equal, the result is FALSE;
ISONORAFTERgives TRUE then. - It is the strict form of the test behind a query's
START AT: insideFILTERit keeps the rows that come after a given row of a sorted list, such as the months after December 2025. - Text is compared without regard to case. A blank sorts just before zero, and before any text, empty text included.
- Two values of types that cannot be compared, such as a number and a text, are an error.
Examples
The months after December 2025
The year decides first; the month only when the year is 2025.
EVALUATE
VAR Months =
DATATABLE (
"Year", INTEGER, "Month", INTEGER,
{ { 2025, 11 }, { 2025, 12 }, { 2026, 1 }, { 2026, 2 } }
)
RETURN
FILTER ( Months, ISAFTER ( [Year], 2025, ASC, [Month], 12, ASC ) )
ORDER BY [Year], [Month]
| Year | Month |
|---|---|
| 2026 | 1 |
| 2026 | 2 |
After, or on or after
December 2025 itself is not after December 2025, but it is on or after it.
EVALUATE
VAR Months =
DATATABLE (
"Year", INTEGER, "Month", INTEGER,
{ { 2025, 11 }, { 2025, 12 }, { 2026, 1 }, { 2026, 2 } }
)
RETURN
ADDCOLUMNS (
Months,
"ISAFTER", ISAFTER ( [Year], 2025, ASC, [Month], 12, ASC ),
"ISONORAFTER", ISONORAFTER ( [Year], 2025, ASC, [Month], 12, ASC )
)
ORDER BY [Year], [Month]
| Year | Month | ISAFTER | ISONORAFTER |
|---|---|---|---|
| 2025 | 11 | FALSE | FALSE |
| 2025 | 12 | FALSE | TRUE |
| 2026 | 1 | TRUE | TRUE |
| 2026 | 2 | TRUE | TRUE |
Descending order
From the largest down, 40 comes after 100. 0 and FALSE are other ways to write DESC.
EVALUATE
ROW (
"DESC", ISAFTER ( 40, 100, DESC ),
"0", ISAFTER ( 40, 100, 0 ),
"FALSE", ISAFTER ( 40, 100, FALSE ),
"ASC", ISAFTER ( 40, 100, ASC )
)
| DESC | 0 | FALSE | ASC |
|---|---|---|---|
| TRUE | TRUE | TRUE | FALSE |
Related functions
ISONORAFTER, FILTER, TOPN, WINDOW, OFFSET.