# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Valued Contributor II

## why compute Total with field = Rate cannot work ?

Hi All

I have below expression work fine :-

Sum( {<eXP={eXP}>} Amount*-1/1000)

Below is the expression which i want to compute TOTAL for the above expression , IT Also work fine, as shown in table 1 :-

Sum(ALL {<eXP={eXP}>} Amount*-1/1000)

Now i have expression below , which convert all the currency to SGD:-

Sum( {<eXP={eXP}>} Amount*-1/1000)/Rate

when i modify the above expression with compute Total as below :-

Sum(ALL {<eXP={eXP}>} Amount*-1/1000)/Rate

it cannot work as shown in Table 2.

Can some one advise me ?

PAul

1 Solution

Accepted Solutions

## Re: why compute Total with field = Rate cannot work ?

You can try this..

Sum(TOTAL Aggr(Sum( {<eXP={eXP}>} Amount*-1/1000)/Rate,SOURCE))

8 Replies
Valued Contributor II

my QV Doc

## Re: why compute Total with field = Rate cannot work ?

Hi Paul,

I think your expression seems to be working fine..

i separated the expression and gives the same result..

Valued Contributor II

Hi Settu

## Re: why compute Total with field = Rate cannot work ?

You can try this..

Sum(TOTAL Aggr(Sum( {<eXP={eXP}>} Amount*-1/1000)/Rate,SOURCE))

Valued Contributor II

## Re: why compute Total with field = Rate cannot work ?

‌HI Settu

thank you very much

paul

Contributor III

## Re: why compute Total with field = Rate cannot work ?

try in this way

Sum(ALL {<eXP={eXP}>} (Amount*-1)/1000)/Rate

Valued Contributor II

## Re: why compute Total with field = Rate cannot work ?

Hi Gupta

I already got the solution , after add Aggr it work fine. As I am using V9 , this is the work around.

Paul

Sent from my iPhone

Valued Contributor II

## Re: why compute Total with field = Rate cannot work ?

Hi Gupta

Correct expression as below from Settu :-

Sum(TOTAL Aggr(Sum( {<eXP={eXP}>} Amount*-1/1000)/Rate,SOURCE))