8 Replies Latest reply: May 25, 2016 7:40 AM by Yeo Poh sai

# 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

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

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

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

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

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

HI Settu

thank you very much

paul

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

try in this way

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

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

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