Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

girishchhatani1
New Contributor III

Facing issue in Aggr() in Qv12

In a Chart i am showing Transaction ID wise sum of Statement Amount

Case 1 : Transaction ID = 6083

Transaction IdValue DatePosting DateStatement AmountNavision AmountDifferenceEntry No_
608301-10-201601-10-20160200000-200000244260673

Case 2 : Transaction ID = BA0020191610030001 (Result is correct because amount 529023 is against a Transaction id)

Transaction IdValue DatePosting DateStatement AmountNavision AmountDifferenceEntry No_
BA002019161003000103-10-201606-10-2016529023200000329023247744313
BA002019161003000103-10-201606-10-20160210000-210000247744316

Expression for Statement Amount :-

=sum(aggr(sum([Transaction Amount(INR)]),[Transaction ID]))

Table Data:-

Value DateTransaction IdTransaction Amount(INR)
01-10-20166083200000
03-10-2016BA0020191610030001529023

Problem is for the Case 1 Statement Amount = 0 it should be 200000

Reason behind doing Aggregation is because my data is on the basis of Transaction ID and not on the basis of Entry No.

Please help me.

Thank you,

Girish

Tags (1)
1 Solution

Accepted Solutions
girishchhatani1
New Contributor III

Re: Facing issue in Aggr() in Qv12

Friends above issue solved by adding all field in the dimension in the aggr() function.

Thank you very much Sunny and Payal for your kind help.

Girish

View solution in original post

7 Replies

Re: Facing issue in Aggr() in Qv12

Where is Transaction Amount here? Would you be able to share more information here or even a sample?

girishchhatani1
New Contributor III

Re: Facing issue in Aggr() in Qv12

In the table data i have mentioned the Transaction Amount.

I have shared you the 2 cases where in Case 1 amount is coming wrong and in the second case amount is coming correct.

Table Data:-

Value DateTransaction IdTransaction Amount(INR)
01-10-20166083200000
03-10-2016BA0020191610030001529023

Re: Facing issue in Aggr() in Qv12

Why won't Sum([Transaction Amount(INR)]) work? If you have Transaction Id as your dimension, it should work unless I am missing something here

girishchhatani1
New Contributor III

Re: Facing issue in Aggr() in Qv12

agreed but i want that Amount should be repeated only once because my transaction amount is on the basis of Transaction id and not on the basis of Entry no.

Highlighted
payalgosar
Contributor II

Re: Facing issue in Aggr() in Qv12

Your expression [=sum(aggr(sum([Transaction Amount(INR)]),[Transaction ID]))] seems to be fine.

Can you to share sample data? This will help us to know the reason for mismatch.

girishchhatani1
New Contributor III

Re: Facing issue in Aggr() in Qv12

Yup i tried but it didn't worked.

Sample data i have shared above.

girishchhatani1
New Contributor III

Re: Facing issue in Aggr() in Qv12

Friends above issue solved by adding all field in the dimension in the aggr() function.

Thank you very much Sunny and Payal for your kind help.

Girish

View solution in original post