XSLT exslt:node-set fucntion for sum value

Hi ALL,

I have below code to get sum value but I am getting “NaN”.

Kindly suggest any Idea.

<xsl:variable name=“subTotals” as=“xs:Decimal”>

<xsl:for-each select=“s1:BankChequeTable”>

<xsl:variable name=“AccoNTN” select=“number(s1:AmountCur)”/>

<xsl:value-of select=“translate($AccoNTN,’,’,’’)”/>

</xsl:for-each>

</xsl:variable>

<xsl:variable name=“myTotal” as=“xs:Decimal” select=“exslt:node-set($subTotals)”/>

<xsl:value-of select=“sum($myTotal)”/>

Please help me I am struggling for this sum value for long time.

Which version of XSLT are you using?

By the way, this forum is about Dynamics AX, you would be better off asking in a forum about XLST/XPath.

Also note that we don’t have your data - consider creating a simplified example that others can run. And please use Insert > Insert Code in the rich formatting view to paste source code.