# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

## Calculation Help

I am working in Sense and my calculation totals in my pivot table are wrong.  However when I select the currency code, then the totals are showing the correct value.

DimensionsMeasures
Aerospace161
EUR25
GBP10
JPY30
USD15

The calculation for the measure is (it is a master measure):

((Sum([Amount in doc. curr.])* avg({<PYTD_Flag={1}>}[Actual Rate]))*-1)/1000

The individuals values are correct, but the sub total (for Aerospace) is not.

thanks

Frank

1 Solution

Accepted Solutions
MVP

## Re: Calculation Help

Try wrapping it around with Sum(Aggr(, AllYourDimensions))

Sum(Aggr(((Sum([Amount in doc. curr.])* avg({<PYTD_Flag={1}>}[Actual Rate]))*-1)/1000, Dimensions))

2 Replies
MVP

## Re: Calculation Help

Try wrapping it around with Sum(Aggr(, AllYourDimensions))

Sum(Aggr(((Sum([Amount in doc. curr.])* avg({<PYTD_Flag={1}>}[Actual Rate]))*-1)/1000, Dimensions))

Contributor II

## Re: Calculation Help

Sunny

I changed to calculation to:

Sum(Aggr(((Sum([Amount in doc. curr.])*

Avg({<CYTD_Flag={1}>}[Actual Rate]))*-1)/1000,[Market Description],[Currency Code]))

And works as expected.  thanks