6 Replies Latest reply: Feb 6, 2015 10:17 AM by ioannis giakoumakis

# Sum of averages in a straight table

Hi,

I have a straight table whith a expression avg().

The values in "Ambar", "Esmeralda",...etc are the values of a dimension , they are average values this is right.

The values "Punta Cana", "Riviera Maya" and "Samaná"  are values of another dimension, they are also average values, but I would like they where sum values so "Punta Cana" = 2904 instead of 968 , etc.

How could I get a sum of averages instead of an average of averages whitout losing this format?

Thanks

• ###### Re: Sum of averages in a straight table

try sum(total <dimension1> aggr(avg(value), dimension2)) or similar

sample application would help

• ###### Re: Sum of averages in a straight table

Hi Luis, you can use:

If(Dimensionality()=1, Sum(Aggr(Avg(ValueFieldName), Dimension2FieldName)),

Avg(ValueFieldName))

Not tested, maybe is:

If(Dimensionality()=1, Sum(Aggr(Avg(ValueFieldName), Dimension1FieldName, Dimension2FieldName)),

Avg(ValueFieldName))

• ###### Re: Sum of averages in a straight table

Hello,

Try something like:

sum(aggr(avg(Exp),Dim1,Dim2)

Aggr should solve that somehow.

BR

Serhan

• ###### Re: Sum of averages in a straight table

for straight table

in expressions -> total mode

choose "Sum of rows"

• ###### Re: Sum of averages in a straight table

I' m sorry it is not a straight table but a pivot table.

I have attached a sample and I would like that the totals were 106 , 82 and 94 instead of 53, 41 and 47.

Thanks