Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I am trying to recalculate the average that I come up with in XSLT. Is this possible? Below is my code:
<xsl:variable name="dvt_ParentRow" select="current()" /> <xsl:variable name="Rows" select="../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]" /> <xsl:variable name="average" select="sum(../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]/@PercentComplete) div count(../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]/@PercentComplete)" /> <xsl:variable name="dvt_RowCount" select="count($Rows)" />
The code does calculate average for each task, now I want to average all tasks per each projects. Any help is appreciated.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Recalculate average
Hi,
I am trying to recalculate the average that I come up with in XSLT. Is this possible? Below is my code:
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]" />
<xsl:variable name="average" select="sum(../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]/@PercentComplete) div count(../../../SubTasks/Rows/Row[@TaskID=$dvt_ParentRow/@TaskID]/@PercentComplete)" />
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
The code does calculate average for each task, now I want to average all tasks per each projects. Any help is appreciated.
is working on a reply...