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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 135 | |
| 110 | |
| 50 | |
| 31 | |
| 29 |