Looking for an expression in a slice. I've go...

(Grant Stead) #1

Looking for an expression in a slice. I’ve got a table, and every time an employee goes up to an asset they scan it. I would like to show a map of every asset’s most recently scanned record.

person_id asset_id track_datetime track_location

So, some sort of select, and max? So, that asset may have 10 records, I want the most recently scanned record, but there might be 40 different assets in that table.

(Grant Stead) #2

The best I’ve came up with is to have a virtual column throw a flag… Then slice on that vc…

(Multi Tech Visions) #3


My thought too.

(Grant Stead) #4


:confused: Well then, that’s what’s going to go down… (Thanks for checking in on me!)

(Reza Raoofi) #5

Assuming the table that has above four columns is called Tracking, go to Assets table and add a VC called LastScan with this formula:

MAXROW(Tracking, track_datetime, [asset_id]=[_THISROW].[asset_id])

Then you can grab other related columns like this: [LastScan].[person_id], or [LastScan].[track_location], etc.

(Grant Stead) #6

I’ll play with this in a bit, thanks reza