Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
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
paulyeo11
Valued Contributor II

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

Picture1.jpg

paulyeo11
Valued Contributor II

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

Hi Settu

Thank you for your reply.

column 2 all same value.png

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

You can try this..

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

paulyeo11
Valued Contributor II

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

‌HI Settu

thank you very much

paul

vsudhakar
Contributor III

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

try in this way

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

paulyeo11
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

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



Community Browser