Scope string for RunningValue and RowNumber


  • I am trying to figure out what string these functions want as the scope.  Looking at various posts and this msdn:

    It looks like I need to put the group name in quotes.  However, when I try and use =sum(Fields!somevalue.value) / RowNumber("Group3")
    the report doesn't build and shows this error:
    The Value expression for the text box 'Run_Time4' has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set o a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

    I am using SSAS 2008 and SSRS 2008.  There are 4 groups and a detailed group.

    I have this data as an example of what I want to see:
    Base Name Run Number Sub Set Run Time
    16 Cores - - Sum(Fields!Run_time.Value) / 3
    16 Cores 1 - Sum(Fields!Run_time.Value)
    16 Cores 1 Queries Fields!Run_time.Value
    16 Cores 1 ETL Fields!Run_time.Value
    16 Cores 2 - Sum(Fields!Run_time.Value)
    16 Cores 2 Queries Fields!Run_time.Value
    16 Cores 2 ETL Fields!Run_time.Value
    16 Cores 3 - Sum(Fields!Run_time.Value)
    16 Cores 3 Queries Fields!Run_time.Value
    16 Cores 3 ETL Fields!Run_time.Value

    Tuesday, September 01, 2009 4:19 PM

All replies

  • It seems that you are trying to find an average of number of runs. Will =Avg(Fields!Run_time.Value) do it?

    Chicagoan ...
    Tuesday, September 01, 2009 4:24 PM
  • Ah, I see, I have to give it the scope of the group.  So this needed to be "Group4".  However, this function is not returning what I want.  I want this number (which is the metric on the first row in the table above) to be the average of the total runtime for the runs.  Do I need to use a variable for this?

    When I do : =sum(Fields!Run_time.Value) / RowNumber("Group4") ... it is the same as Avg(Fields!Run_time.value).  I was hoping that RowNumber("Group4") would just return the number of rows in the next group.
    Tuesday, September 01, 2009 4:25 PM