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?
Solved! Go to Solution.
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)
)
)
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)
)
)
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |