Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
Can you please tell me what is exact difference between only() and aggr().
Thanks
ONLY:
If expression over a number of records, as defined by a group by clause, contains only one numeric value, that value is returned. Else, NULL is returned.
AGGR:
Returns a set of values of expression calculated over dimensions.
hi
only returns a value only if there is one distinct value in the filed we check
example :
only(EmployeeName) will return a value only if in the field EmployeeName will have 1 value
aggr returns a set of result according to the dimensions we defined in the function
aggr(if(sum(sales)>100,EmplyoeeName),EmployeeName)
will return a list of all emplyoees where thier sales are more than 100
Well, I don't think the two functions have much in common, so maybe it's easier if you tell what you think they share?
Only() is an aggregation function.
Aggr() is not an aggregation function.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/05/19/function-classes
HIC