Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with 3 fields: timestamp, name, value.
I want to return the value if the name equals a certain value ("ABC" in this example) and the timestamp is the most recent (data is updated regularly).
I already have this expression which works perfectly:
=aggr(if(timestamp = max(Total <name> timestamp) and name = 'ABC', max(value)), name, timestamp)
However, now I realized that I need to include this in a set analysis statement to prevent the value being changed by selections. From what I gather, I need to add {1} inside the max() function, however I have no idea how exactly to insert it, since my multiple tests have failed. Also, I wonder if I have to add it to other parameters since the if() statement is inside and aggr() function.
Thanks for your help!
Try this
=Only({1} Aggr(If(Only({1} timestamp) = Max({1} TOTAL <name> timestamp) and Only({1} name) = 'ABC', Max({1} value)), name, timestamp))
Try this
=Only({1} Aggr(If(Only({1} timestamp) = Max({1} TOTAL <name> timestamp) and Only({1} name) = 'ABC', Max({1} value)), name, timestamp))
That was fast! Thank you, it works!
I will go read a little bit about only(). 🙂
Thanks!