14 Replies Latest reply: Aug 10, 2017 4:22 PM by Philippe BONNIN

# Average weight of a table

Hello,

I created this table

Unfortunely, the average (22.85%) is not the weighted average as i looking for...

Do you know how do these weighted average ?

Thanks

• ###### Re: Average weight of a table

What is the number you are expecting to see?

• ###### Re: Average weight of a table

I'am expecting (23.10%*3822831+15.4%*2875939+28.8%*680411+24.10%*1107559)/8486740 = 21.08%

• ###### Re: Average weight of a table

Then try this

Sum(Aggr(Expression for % MARGE THEO * Expression for CAHT, SECTEURS))

• ###### Re: Average weight of a table

I understand your answer (thank's); but as a begginer i don't know where insert these instruction ? Indeed, the total line is automaticly created after the selection as shown :

i can't write an fx ...

• ###### Re: Average weight of a table

What other options do you see here? Do you see Expression Default?

• ###### Re: Average weight of a table

no

i see

auto

avg

count

max

min

sum

none

but not

expression fx

:-(

• ###### Re: Average weight of a table

Can you check with auto and this expression

Sum(Aggr(Expression for % MARGE THEO * Expression for CAHT, SECTEURS))

• ###### Re: Average weight of a table

if i select auto i have no window to write the expression ???

• ###### Re: Average weight of a table

Would you be able to share a sample qvf file?

• ###### Re: Average weight of a table

Yes of course

but i don't know how send the file ... sorry

• ###### Re: Average weight of a table

thank's

here is the file

• ###### Re: Average weight of a table

Check this out

Expression

If(Dimensionality() = 0, Sum(Aggr(Sum(CIB_MBTVTE)*Sum(VMS_CAHT), NCL_LIB))/Sum(VMS_CAHT), Sum(CIB_MBTVTE))

• ###### Re: Average weight of a table

GREAT JOB !

i 'll study these expression to be able to reproduce ...

thank's a lot

see you !