SharePoint Designers

All about Branding & Customizations in SharePoint

SharePoint Dataview - add sum of all values in a column

Hello,

 

I have created a dataview in SharePoint Designer 2007 and now I´m struggling with adding the sum of all the values in a column. I tried to change the count expression to sum in the XPath Expression Builder but it does not seem to work. This is the Expresion that I have inserted


format-number(sum(@Total), "#,##0.;-#,##0.") where Total is the name of the column. Any ideas anyone?

/ Jenny

Tags: Dataview

Views: 280

Reply to This

Replies to This Discussion

Hi Jenny, whats about to use:

<xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Total) " />

You can also do more calculations like:

<xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Total) * 10" />
or for example:
<xsl:value-of select="sum(/dsQueryResponse/Rows/Row[normalize-space(@ProjNr) = '20']/@Total) * 10" />

Hi Christian,

 

Yes, It worked out fine. Thank you for quick help!

// Jenny

Tnx Jenny, I´m glad that this could help you.
See you around. / Christian

Reply to Discussion

RSS

Birthdays

Birthdays Today

Birthdays Tomorrow

© 2012   Created by Christian Ståhl.

Badges  |  Report an Issue  |  Terms of Service