XSLT : Cummulative Sum

venkatasiva yadav 231 Reputation points
2021-07-07T03:55:28.19+00:00

I need to do a sum within biztalk map or custom xslt. The sum of different field from different records should be calculated only for providers listed within the 'TotalAmount' Element.

I would appreciate any help. Thanks!

Here is the sample Input XML and output XML.

****Input:****

<BillsReports>
<BillsHeader>
<Electricity> ----Repeat Record
<Consumption>1,234.345</Consumption>
</Electricity>
<Water> ---- Repeat Record
<Consumption>1,234.44</Consumption>
</Water>
<ETax>-- Repeat Record
<E_Tax>12.45</E_Tax>
<ETax>
<WTax> --Repeat Record
<W_Tax>12.34</W_Tax>
</WTax>
<MNCPL>--Repeat record
<CurCharg>2345.43</CurCharg>
</MNCPL>
</BillsHeader>
</BillReports>

output:
<DOCBillReport>
<BillReport>
<Header> ---- no repeat record
<TotalAmount>4,839.005</TotalAmount>
</Header>
</BillReport>
</DOCBillReport>

Microsoft BizTalk Server
Microsoft BizTalk Server
A family of Microsoft server products that support large-scale implementation management of enterprise application integration processes.
361 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful