Select Max entry by user

I need to get the latest Check In by user. My current idea is user table virtual column [Last Check In ID] and then filter a slice by the user table. Any different methods for grabbing MAX entry grouped by X?

Hello Austin,

If I understand the question correct, I think combine the MAX() with SELECT() function could solve the problem.

Say you have one column UserId and another column CheckInTime, then every time a user check in you append a new row, the table could look like below.


UserId CheckInTime
a@g.com 1970-01-01
b@g.com 1970-01-01
a@g.com 1970-01-03


then the expression could be:

MAX(
SELECT(
TableName[CheckInTime],
([USER]=“userId say a@g.com or ref”,
false)
)
)

3 Likes