4 Replies Latest reply: Nov 23, 2016 4:43 AM by Girish Chhatani

# Issue related to First Sorted Value

Hey friends,

Facing issue while calculating Statement Amount using FirstSortedvalue()

Transaction IdValue DateBank codeAmount_1Amount_2Posting DateBranch Code
BA0030160921-01921-09-2016BA0030250002500001-10-2016B0060
BA0030160921-01921-09-2016BA003025000001-10-2016B0180

Master Table:-

Transaction IdValue DateAmount_1
BA0030160921-01921-09-2016250000

Transaction Table:-

Transaction IdBranch CodeUser ID
BA0030160921-019B0060SHANKARR
BA0030160921-019B018033199

Expected Output

Transaction IdValue DateBank codeAmount_1Amount_2Posting DateBranch Code
BA0030160921-01921-09-2016BA0030250002500001-10-2016B0060
BA0030160921-01921-09-2016BA00300001-10-2016B0180

Because Amount_1 is 25000 against the given Transaction Id.

Girish Chhatani

• ###### Re: Issue related to First Sorted Value

Hi Girish

Can we have a complete view of your transaction table?

Regards

Pratyush

• ###### Re: Issue related to First Sorted Value

Thank you Pratyush for the prompt reply.

Actually its the complete view.

Moreover Link between Master and Transaction table is Transaction ID only.

Because there is 1 record in Master and 2 records against ID BA0030160921-019 with 2 different Branch code B0060 and B0180.

So 2 records are appearing in the chart.

I want while computing Amount_1 once 1 time 25000 should get reported.

Thank you,

Girish

• ###### Re: Issue related to First Sorted Value

>>I want while computing Amount_1 once 1 time 25000 should get reported.

You need to supply a rule as to which row should be used, and which should be set to zero. From the info you have provided, the only difference between the rows appear to be the Branch Codes.

• ###### Re: Issue related to First Sorted Value

Thanks u very much for the reply!!!

above issue solved by ur aggr() on the basis of Transaction Id.

Warm Regards,

Girish Chhatani