Row Count of Group

  • Is there a way to get the row number of the group? my table is a list of customers an value grouped by customer name with the detail hidden.

    i have tried =countrows() and =runningvalue(1,count,nothing) but this gives me the count of rows within the group.

    this is the what i am trying to achieve

    Customer , Value , Running count

    customer 1, £10,000, 1

    customer 1, £9,000 , 2

    customer 1, £7,000 , 3

    customer 1, £1,000 , 4

  • Have you tried RowNumber()?

    https://msdn.microsoft.com/en-us/library/dd255249.aspx

  • Thanks for the reply but im getting the same result

  • Ah Ok so you have hidden rows? What is the expression you are using to hide the rows? For example if the rows were being hidden by the following expression

    =IIf(Fields!Field1.Value = 0, True, False) then you need to also apply this expression to your running value as per the example below.

    =RunningValue(IIf(Fields!Field1.Value = 0, Nothing, Fields!Field1.Value), CountDistinct,"DataSet")

    where DataSet is your dataset or tablix.

  • its a tablix which i have grouped by customer and hidden the detail row by using the row visability option

  • How about

    =RowNumber("Customer")

    It resets every time the Customer value changes.

  • You can use the following expression in the Group footer where Cusotmer is the grouping value and DataSet1 is the name of your dataset.

    =RunningValue(Fields!Customer.Value, CountDistinct,"DataSet1")

    I'm assuming your earlier example is misleading and you meant Customer 1, Customer 2 etc.

  • sorry , yes i did mean customer 1, customer 2 .......etc

    thanks for the reply i will try this in the morning

Viewing 8 posts - 1 through 7 (of 7 total)

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