Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a dimension "EventTime" which is timestamp dimension,
and for each User, Activity combination I'm able to get the last timestamp value with the
aggr(max(num(EventTime)),Activity,User)
but when i try to compare it with simple if to to the EventTime dimension in-order to create indication that that was the "last attempt" i always get wrong answer
my if is:
if(
aggr(max(num(EventTime)),Activity,User) = num(EventTime)
, 'Last attempt','Other'
)
this is my table:
Hi,
This expression should work:
=If(max(total<User,Activity> EventTime) = EventTime, 'Last attempt', 'Other')
In regard to your screenshot it seems that you didn't need the aggr() and the query of:
EventTime = max(EventTime)
should be working. If the structure is really a bit more complex you will probably need to do the comparing within the aggr() like:
if(
aggr(max(EventTime) = EventTime,Activity,User)
, 'Last attempt','Other'
)
- Marcus
Hi,
This expression should work:
=If(max(total<User,Activity> EventTime) = EventTime, 'Last attempt', 'Other')
Thank you for assiting,
so the Max(EventTime) = EventTime
always return true. because each row is the Max of itself. so this didn't help.
the code you wrote is new to me, but unfortunately didn't solve the problem.
thank you any way 🙂
Amazing this solved it.
If it's not to much, can you explain a little bit on this convention of total with the dimensions?
total<User,Activity> EventTime)