# Qlik Sense App Development

Contributor II

## 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

1 Solution

Accepted Solutions
MVP

## Re: Average weight of a table

Then try this

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

14 Replies
MVP

## Re: Average weight of a table

What is the number you are expecting to see?

Contributor II

## Re: Average weight of a table

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

MVP

## Re: Average weight of a table

Then try this

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

Contributor II

## 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 ...

MVP

## Re: Average weight of a table

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

Contributor II

no

i see

auto

avg

count

max

min

sum

none

but not

expression fx

:-(

MVP

## Re: Average weight of a table

Can you check with auto and this expression

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

Contributor II

## Re: Average weight of a table

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

MVP

## Re: Average weight of a table

Would you be able to share a sample qvf file?