START AT in DAX: Retrieve Data from a Specific Starting Point
In this article, we will learn how to use START AT in DAX queries to begin retrieving data from a specific position. We will explore examples using number, text, and date columns.
START AT is useful when you want to retrieve a portion of an ordered table instead of displaying the complete result.
📥 Practice Data:
Download Practice Data Free
🎥 Prefer learning through video?
DAX YouTube Playlist
What Is START AT in DAX?
START AT is used with ORDER BY to specify the starting value of a DAX query result.
It works with an ordered table expression and begins returning rows from the specified starting position.
The basic syntax is:
EVALUATE
<Table Expression>
ORDER BY
<Column>
START AT <Value>
START AT must be used with ORDER BY to define the starting point of the result.
1. START AT with a Number Column
Query
// Start At - Number Column
EVALUATE
Sales
ORDER BY
Sales[SalesTerritoryKey]
START AT 4
Step-by-step explanation
Step 1: EVALUATE
EVALUATE returns the result of the table expression.
Step 2: Sales
Sales is the table expression that we want to retrieve.
Step 3: ORDER BY Sales[SalesTerritoryKey]
The result is ordered using SalesTerritoryKey in ascending order.
Step 4: START AT 4
The query starts returning rows from the position where the ordered column reaches 4.
What will you get?
The result begins at the specified starting value and continues with the remaining rows in the ordered result.
| SalesTerritoryKey | CustomerKey | Sales Amount |
|---|---|---|
| 4 | 101 | 5000 |
| 5 | 102 | 3500 |
| 6 | 103 | 4200 |
The example above is for illustration. Your actual result depends on the data available in the Sales table.
START AT 4 begins the ordered result from the specified numeric starting point.
2. START AT with a Text Column
Query
// Start At - Text Column
EVALUATE
Customer
ORDER BY
Customer[Customer]
START AT "Evan Carter"
Step-by-step explanation
Step 1: EVALUATE
EVALUATE returns the result of the table expression.
Step 2: Customer
Customer is the table expression that we want to retrieve.
Step 3: ORDER BY Customer[Customer]
The result is ordered using the Customer column in ascending order.
Step 4: START AT “Evan Carter”
The query starts returning rows from the position where the ordered column reaches “Evan Carter”.
What will you get?
The result begins at the specified text value and continues with the remaining rows in the ordered result.
| Customer | CustomerKey |
|---|---|
| Evan Carter | 101 |
| Fiona Adams | 102 |
| George Brown | 103 |
The example above is for illustration. Your actual result depends on the data available in the Customer table.
START AT “Evan Carter” begins the ordered result from the specified text starting point.
3. START AT with a Date Column
Query
// Start AT - Date Column
EVALUATE
'Date'
ORDER BY
'Date'[Full Date]
START AT
DATE(2020, 12, 30)
Step-by-step explanation
Step 1: EVALUATE
EVALUATE returns the result of the table expression.
Step 2: ‘Date’
‘Date’ is the table expression that we want to retrieve.
Step 3: ORDER BY ‘Date'[Full Date]
The result is ordered using the Full Date column in ascending order.
Step 4: START AT DATE(2020, 12, 30)
The query starts returning rows from the position where the ordered date reaches December 30, 2020.
What will you get?
The result begins at the specified date and continues with the remaining rows in the ordered result.
| Full Date | Calendar Year | Month |
|---|---|---|
| 2020-12-30 | 2020 | December |
| 2020-12-31 | 2020 | December |
| 2021-01-01 | 2021 | January |
The example above is for illustration. Your actual result depends on the data available in the Date table.
START AT DATE(2020, 12, 30) begins the ordered result from the specified date.
Understanding the Difference
| Column Type | START AT Example | Purpose |
|---|---|---|
| Number | START AT 4 | Starts from a numeric value |
| Text | START AT “Evan Carter” | Starts from a text value |
| Date | START AT DATE(2020, 12, 30) | Starts from a date value |
Important Notes
1. START AT works with ORDER BY
START AT is used after ORDER BY to define the starting point of the result.
2. The starting value depends on the ordered column
The value specified in START AT should match the data type of the column used in ORDER BY.
3. The result continues from the starting point
START AT does not specify how many rows to return. It defines where the ordered result begins.
4. START AT is useful for exploring large tables
It can help you begin viewing a result from a particular number, name, or date instead of starting from the beginning.
📝 Practice Exercise
Try writing a query to retrieve the Sales table, order it by SalesTerritoryKey, and start the result at 10.
Expected Query
EVALUATE
Sales
ORDER BY
Sales[SalesTerritoryKey]
START AT 10
Conclusion
In this article, we learned how to use START AT in DAX queries.
- START AT defines the starting point of an ordered result.
- It works with ORDER BY.
- It can be used with number, text, and date columns.
- The result continues from the specified starting value.
- It is useful for exploring and retrieving portions of large tables.
Understanding START AT helps you write more flexible DAX queries and explore data efficiently in tools such as DAX Studio.
📥 Practice Data:
Download Practice Data Free
🎥 Prefer learning through video?
DAX YouTube Playlist