From: Zack G on
I have a report that groups transactions on the customer level and
then the customers according to some dollar value associated with each
customer. I would like to include a ranking for each customer based on
that dollar value, i.e. the highest dollar value customer will be 1
and so on. I was thinking it might be possible to create a variable
that starts at one and adds one every time the group breaks and print
that variable as the ranking. Is this possible and if not, is there
another way to approach the problem? Thanks.
From: Wayne on
Have you looked into using the row_number() and over/partiton clauses of the
select command?

"Zack G" wrote:

> I have a report that groups transactions on the customer level and
> then the customers according to some dollar value associated with each
> customer. I would like to include a ranking for each customer based on
> that dollar value, i.e. the highest dollar value customer will be 1
> and so on. I was thinking it might be possible to create a variable
> that starts at one and adds one every time the group breaks and print
> that variable as the ranking. Is this possible and if not, is there
> another way to approach the problem? Thanks.
>
From: Zack G on
I have a stored procedure and I have to use the data that it is
returning so I cannot modify the SELECT statement (I hope I am
understanding you correctly).

On Jun 16, 1:48 pm, Wayne <Wa...(a)discussions.microsoft.com> wrote:
> Have you looked into using the row_number() and over/partiton clauses of the
> select command?
>
> "Zack G" wrote:
> > I have a report that groups transactions on the customer level and
> > then the customers according to some dollar value associated with each
> > customer. I would like to include a ranking for each customer based on
> > that dollar value, i.e. the highest dollar value customer will be 1
> > and so on. I was thinking it might be possible to create a variable
> > that starts at one and adds one every time the group breaks and print
> > that variable as the ranking. Is this possible and if not, is there
> > another way to approach the problem? Thanks.

From: Zack G on
I was hoping this could be done entirely within SRS.

On Jun 16, 1:48 pm, Wayne <Wa...(a)discussions.microsoft.com> wrote:
> Have you looked into using the row_number() and over/partiton clauses of the
> select command?
>
> "Zack G" wrote:
> > I have a report that groups transactions on the customer level and
> > then the customers according to some dollar value associated with each
> > customer. I would like to include a ranking for each customer based on
> > that dollar value, i.e. the highest dollar value customer will be 1
> > and so on. I was thinking it might be possible to create a variable
> > that starts at one and adds one every time the group breaks and print
> > that variable as the ranking. Is this possible and if not, is there
> > another way to approach the problem? Thanks.