Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to use aggr to sum rows over two dimensions, however it's returning the expression total and not the sum of the rows. I cannot change the 'total mode' to 'sum of rows' as it won't work for my application, I need to do this with an aggr function, but am unable to do so.
Screen shot below illustrates issue:
I need to return 103.87 for each record in dim1 and dim2. When I try this with an aggr, it returns the quotient evaluated over the sum of the records in the aggr, 38.006, whereas I need the sum 103.87. The expression for sumrpc is:
sum(aggr(NODISTINCT
sum(rev)/sum(visits)
,dim1,dim2))
I've attached a sample, any help is welcome.
Thanks,
Matt
not sure to understand, try
sum(total <dim1,dim2> aggr(sum(rev)/sum(visits),dim1,dim2,dim3))
not sure to understand, try
sum(total <dim1,dim2> aggr(sum(rev)/sum(visits),dim1,dim2,dim3))
Great work!!!