Calculated field ifelse

I want to create a calculated field to bring the last user who viewed a panel or dashboard, but ‘ifelse’ does not allow adding the ‘max’ function."

ifelse(max({latest_event_time})={latest_event_time},{email},“”)

Thanks

Most likely the issue is that you are mixing aggregated and unaggregated fields in the same expression. You should be able to get it working by replacing max with maxOver function with the 3d argument set to PRE_AGG. Documentation for maxOver function maxOver - Amazon QuickSight

If you want to compute global maximum, the expression will be ifelse(maxOver({latest_event_time}, [], PRE_AGG)={latest_event_time},{email},"")

2 Likes

It worked very well, thank you very much

1 Like

Glad you got your solution @chgamez! Thanks, @Tatyana_Yakushev :slight_smile: