cancel
Showing results for 
Search instead for 
Did you mean: 

Count and Sum

Former Member
0 Kudos

Source:

<Detail>

<Status>approved</Status>

<Amount>1001</amount>

</detail>

<Detail>

<Status>SL no not mentioned(not approved)</Status>

<Amount>15</amount>

</detail>

<Detail>

<Status>Name Blank(not approved)</Status>

<Amount>20</amount>

</detail>

<Detail>

<Status>approved</Status>

<Amount>67</amount>

</detail>

Target

<Record>

<CountOfApprovedRecord>2</CountOfApprovedRecord>

<totalAmountApproved>1068</totalAmountApproved>

<CountOFNOTApprovedRecord>2</count>

<totalAmountNOTApproved>35</totalAmount>

</record>

Subject edited by: Moderator on Nov 13, 2010 10:10 PM

Edited by: Debashish Roy on Nov 14, 2010 7:32 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

have you tried the if then condition

status equals approved to if

pass the amount to then

use the sum for the above output

Former Member
0 Kudos

Could you clarify what is your question?

Former Member
0 Kudos

Thanks for your reply......

Actually i need the count of no of records which have been approved as well as the total approved amount...

rest all the records are not approved .I need count of them also as well as sum

Former Member
0 Kudos

i think then u have 2 target fields one for appr amount and the other for non approved

1. status equals approved-->IF pass amount to THEN, use a count --> Trg1

2. status equals approved>NOT>IF pass amount to THEN, use a count -->Trg2

Former Member
0 Kudos

Experts thanks.......Problem resolved