Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am still trying to wrap my head around the Aggr() function, so I need some help! I want to group a set of data by ID, and then know how many distinct string values are attributed to that ID. Once I know that there is more than one unique string, I'd like to display the ID as a dimension. That said, I have this as my dimension expression:
=if(aggr(Count(DISTINCT UniqueString), ID) > 1, ID, Null())
This is returning all Null values. Please help me resove the issue.
Thanks,
Paul
You must have an expression! enter a expression sum(1) and return
Hi,
Whar is your expression? It may give a zero or null.
Regards
My expression is in the dimension field (custom dimension expression).
You must have an expression! enter a expression sum(1) and return
Try adding both dimension
ID,
and calculated dimension
=if(Count(DISTINCT UniqueString) > 1, ID, Null())
and then do Suppress if NULL on calculated dimension
go to presentation tab
and hide ID
Ahh sorry, I misunderstood your question. I DO have an expression - it's to choose the FirstSortedValue() of unique string based on a date. I double checked my expression and I had reversed the order of the parameters in FirstSortedValue() - I had date first and then UniqueString. *FACEPALM*
I corrected the expression and VOILA. This was a simple/stupid error - thanks for the suggestion and for keeping me sane!
-Paul