count of first column

  • Hi, I have a column with name ID. The ID value is repeated in query and I grouped it using group by.

    It is showing correct way in report. At the end of the report I want the count of the ID. But it is showing total number of IDs in query and not the count displayed in the report. How to get the count displayed in the report.

    Note: the second and third column have more than one row for single ID in report.

  • Do you have grouping on the report itself? If you have Row Grouping on the field, this will show the SUM (or whatever aggregate you want) at the bottom of the report.

    See this page from Microsoft on Grouping/Totals:

    http://msdn.microsoft.com/en-us/library/ms170712.aspx

    HTH.

    Mike

  • I resolved it by using CountDistinct ().. Thank you.

  • Glad you figured it out. Thanks for letting us know!

    Mike

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply