0

I have a Data View Web Part with a grouping. Now I have a column that contains either 'Yes' or 'No'. I am able to count the number of 'Yes' and "No' under certain grouping, however, I would like to know if there is anyway to count only 'Yes'?

Here is what the current xslt looks like:

<xsl:value-of select="count($nodeset/@Status)" /> 

Again it's counting @Status under certain nodeset but I would like to count only those @Status which has value of 'Yes'.

Any help will be greatly appreciated.

1 Answer 1

0

Untested since I don't have your particular nodeset but it should be something similar to the following:

<xsl:value-of select="count($nodeset[@Status='Yes'])" /> 

The XPATH may need some work but you can put conditions within brackets like that.

1
  • Thank you awesome! Im bit new to XSLT world, thanks a lot for your help :)
    – premsh
    Jan 25, 2012 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.