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.

2
  • 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? Commented Apr 28, 2014 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) Commented Apr 29, 2014 at 5:34

1 Answer 1

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.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.