Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 48 | |
| 38 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 91 | |
| 77 | |
| 37 | |
| 27 | |
| 25 |