none
count number of rows of a elemente RRS feed

  • Question

  • Hi,

    i have a table associated with a dataset and i have this columns (client, year,month).

    Now for every client i need to go to another dataset and count the number of times a client is repeated in the different months.

    The second database has different data and filters and i can't use only one dataset so i need a solution where for every client i get the number of repetitions on the second dataset.

    I used count but i don't know how to say to count only repetitions of a spefic client, not all the records.

    Thanks.

    Tuesday, April 17, 2012 3:53 PM

Answers

  • Hi  ermal1981 ,

    Use lookup()

    Lookup(source_expression, destination_expression, result_expression, dataset)

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

    Hope this helps.

    • Marked as answer by ermal1981 Thursday, April 26, 2012 8:59 AM
    Wednesday, April 18, 2012 11:47 AM

All replies

  • Hi  ermal1981 ,

    Use lookup()

    Lookup(source_expression, destination_expression, result_expression, dataset)

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

    Hope this helps.

    • Marked as answer by ermal1981 Thursday, April 26, 2012 8:59 AM
    Wednesday, April 18, 2012 11:47 AM
  • Hi ermal1981,

    In Reporting Services, we can use built-in functions such as Count to return a count of the values from the specified expression. When we want to count the values from a different dataset, the scope must be the target dataset.

    In this issue, you can get the count of repetitions of each client in all of the months/years from dataset2 by using an expression like:
    =Count(Fields!FieldName.Value, “DataSet2”)

    Reference:
    Count Function

    If you have any further questions, please feel free to ask.

    Regards,
    Mike Yin

    Monday, April 23, 2012 1:44 AM
    Moderator