This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a table like this now.
| Car ID | Task ID | Type | Start time | Finish time |
| Car A | 123 | S | 14/7/2022 10:00:00 | 14/7/2022 10:00:01 |
| Car A | 124 | T | 14/7/2022 10:00:01 | 14/7/2022 10:01:00 |
| Car A | 124 | T | 14/7/2022 10:00:02 | 14/7/2022 10:01:05 |
| Car A | 125 | S | 14/7/2022 10:01:07 | 14/7/2022 10:01:10 |
| Car A | 126 | S | 14/7/2022 10:01:13 | 14/7/2022 10:01:13 |
| Car B | 234 | T | 14/7/2022 09:02:00 | 14/7/2022 09:02:10 |
| Car B | 234 | T | 14/7/2022 09:01:59 | 14/7/2022 09:02:10 |
| Car B | 235 | S | 14/7/2022 09:02:06 | 14/7/2022 09:02:20 |
| Car B | 236 | S | 14/7/2022 09:02:19 | 14/7/2022 09:02:30 |
I am wondering what is the difference between the following two expressions.
Expression 1:
vMaxPrevTaskFinish =
VAR vThisTaskID = CarTasks[Task ID]
return
CALCULATE (
MAX ( CarTasks[Finish time] ),
ALLEXCEPT ( CarTasks, CarTasks[Car ID] ),
CarTasks[Task ID] < vThisTaskID
)
Expression 2:
_vMaxPrevTaskFinish =
VAR vThisTaskID = CarTasks[Task ID]
return
CALCULATE (
MAX ( CarTasks[Finish time] ),
ALLEXCEPT ( CarTasks, CarTasks[Car ID] ),
FILTER(CarTasks,CarTasks[Task ID] < vThisTaskID)
)
Result:
Leading to different results.
The only difference is whether putting a FILTER function onto the "Task ID". In my mind, they are just doing the same thing as both of them are to "filter" something by passing a condition statement to the CALCULATE function.
Can someone explain to me what is the difference between them?
Solved! Go to Solution.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 26 | |
| 25 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 22 | |
| 19 | |
| 18 |