1

Hi i know that we can find number of rows in XSLT data view web part by using this expression

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:value-of select="count($Rows[@Age])" />

Where Age is a column in the List.

Can any one help me to find out distinct number of rows in the same way. I am using XSLT 1.0 Thanks in Advance.

  • What exactly is it you want to find? The total count of rows or the total count of rows with a value in a specific column? – user2536 Apr 28 '14 at 13:33
  • I am trying to find out total number of distinct rows for a specified column in a list (Where Age is a column in the list) – vinod kumar Apr 29 '14 at 5:34
0

Finally i am able to find out answer to my problem.

This is the one that is working for me

<xsl:key match="Row" name="keyy" use="@Age"></xsl:key>
<xsl:value-of select= "count(//Rows/Row[generate-id() = generate-id(key('keyy', @Age)[1])])"/>

Where Age is a column which will be having unique values.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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