# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for
Did you mean:
Highlighted Contributor II

## Weighted Average Total not working correctly

Hi,

The formula below calculates the weighted average of the interest rate.  Each row/line item matches up perfectly but my total row does not.  Is there a way to calculate a total of the weighted average?

sum({\$<Month={'7'},Year={'2017'}>}([CD Balance]*[Interest Rate]))/Sum({\$<Month={'7'},Year={'2017'}>}[CD Balance])

Thanks

3 Replies
Highlighted MVP

## Re: Weighted Average Total not working correctly

Can you tell us more about the context?

It's hard to tell what's wrong without knowing what you get using which input and what you expect to see instead.

Highlighted MVP

## Re: Weighted Average Total not working correctly

Are you looking to sum the individual rows for your total? May be try this

Sum(Aggr(Sum({\$<Month={'7'},Year={'2017'}>}([CD Balance]*[Interest Rate]))/Sum({\$<Month={'7'},Year={'2017'}>}[CD Balance]), Dimension/s))

Replace the Dimension/s part with the list of dimensions from your chart

Highlighted Creator III

## Re: Weighted Average Total not working correctly

Try like this maybe.... more context needed.....

sum(TOTAL<Dimension> { \$<Month={'7'},Year={'2017'}>}([CD Balance]*[Interest Rate]))/Sum({\$<Month={'7'},Year={'2017'}>}[CD Balance])