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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm trying to track the movement of a piece of equipment with the current location and the date. Example:
| Serial Number | Date | Location | Expected Out Come |
| 123 | 07/10/2018 | New York | New York |
| 123 | 7/20/2018 | Baltimore | New York |
| 123 | 08/10/2018 | Miami | Baltimore |
| 123 | 08/12/2018 | Richmond | Miami |
Etc..
Right now my code is only find the orgin of where the serial number was located. So everything in the Expected column is reading New York.
Orgin = VAR Orgin =
CALCULATE (
MIN ( Table_owssvr[Utilization Date] ),
ALLEXCEPT (Table_owssvr,Table_owssvr[Serial Number] )
)
RETURN
CALCULATE (
SELECTEDVALUE ( Table_owssvr[Port] ),
FILTER (
ALLEXCEPT ( Table_owssvr, Table_owssvr[Serial Number]),
Table_owssvr[Utilization Date] = Orgin
)
)
Expected Out Come is what I need the column to say. The Date isn't always ordered and the same location can come up more then once. I am using this column on a flow map to track the location of the equipment.
Solved! Go to Solution.
Hi @Anonymous
Try this:
Orgin =
VAR Orgin =
CALCULATE (
MAX ( Table_owssvr[Utilization Date] );
Table_owssvr[Utilization Date] < EARLIER ( Table_owssvr[Utilization Date] );
ALLEXCEPT ( Table_owssvr; Table_owssvr[Serial Number] )
)
VAR Res_ =
CALCULATE (
SELECTEDVALUE ( Table_owssvr[Port] );
Table_owssvr[Utilization Date] = Orgin
ALLEXCEPT ( Table_owssvr; Table_owssvr[Serial Number] );
)
RETURN
IF ( NOT ISBLANK ( Res_ ); Res_; Table_owssvr[Port] )
Hi @Anonymous
Try this:
Orgin =
VAR Orgin =
CALCULATE (
MAX ( Table_owssvr[Utilization Date] );
Table_owssvr[Utilization Date] < EARLIER ( Table_owssvr[Utilization Date] );
ALLEXCEPT ( Table_owssvr; Table_owssvr[Serial Number] )
)
VAR Res_ =
CALCULATE (
SELECTEDVALUE ( Table_owssvr[Port] );
Table_owssvr[Utilization Date] = Orgin
ALLEXCEPT ( Table_owssvr; Table_owssvr[Serial Number] );
)
RETURN
IF ( NOT ISBLANK ( Res_ ); Res_; Table_owssvr[Port] )
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |