Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hej all,
I'm creating a table in Sense in which I want to show Resource | # Changes | Last Change | Changed By |
Where
Resource = [Resource] field (about 10 unique possible values)
# Changes = sum([change_count])
Last Change = latest date of a change ([change_count]) = Max({<change_count={1}>} LogTimestamp)
Changed By = ActiveUserId of the person who made that latest change*
I can't figure out how to write the expression to get the UserId for the latest change in each [Resource].
Data looks like:
Resource | LogTimestamp | Change Description | ActiveUserId | qmc_change |
Connection | 1-14-10 11:34 | Updated Name and password | domain\usr3 | 1 |
App | 1-14-10 10:02 | Delete App | domain\usr4 | 1 |
App | 1-14-10 8:31 | Rename App | domain\usr5 | 1 |
Content | 1-14-10 7:00 | Added file to content | domain\usr1 | 1 |
Security Rule | 1-14-10 5:29 | changed rule 1803 | domain\usr3 | 1 |
Security Rule | 1-14-10 3:58 | added sync rule 392 | domain\usr3 | 1 |
Content | 1-14-10 2:26 | create content space | domain\usr9 | 1 |
Seems like this shouldn't be so difficult!
Any ideas?
Some unsuccessful attempts...
maxstring({<ActiveUserId={"=LogTimeStamp=max(LogTimeStamp)"}>} ActiveUserId) >> works when one Resource selected (correct value) but returns NULL when table has multiple rows (Resources)
maxstring({<LogTimeStamp={">=$(max(LogTimeStamp))"}>} ActiveUserId) >> wrong value
maxstring({<qmc_change={1}, LogTimeStamp={">=$(max(LogTimeStamp))"}>} ActiveUserId) >> wrong value
maxstring({<qmc_change={1}, LogTimeStamp={">=$(max({<qmc_change={1}>} LogTimeStamp))"}>} ActiveUserId) >> wrong value
only({<qmc_change={1}, LogTimeStamp={">=$(max({<qmc_change={1}>} LogTimeStamp))"}>} ActiveUserId) >> NULL
maxstring({<qmc_change={1}, LogTimeStamp={"=$(max({<qmc_change={1}>} LogTimeStamp))"}>} ActiveUserId) >> NULL
minstring({<qmc_change={1}, LogTimeStamp={"=$(max({<qmc_change={1}>} LogTimeStamp))"}>} ActiveUserId) >> NULL
only({<qmc_change={1}, LogTimeStamp={"=$(max({<qmc_change={1}>} LogTimeStamp))"}>} ActiveUserId) >> NULL
Hi, Tyler. Try firstsortedvalue(ActiveUserId,-LogTimeStamp)
Regards,
Vlad
Hi, Tyler. Try firstsortedvalue(ActiveUserId,-LogTimeStamp)
Regards,
Vlad
Vlad - great idea - simple and functional! I don't know how I missed that, so thank you for pointing me to this.
Tyler