I have a simple Access table [Parts] that stores the data
Part# CYTD_SALES CUST_NUM
I need to rank the parts in terms of CYTD Sales (Current Year To Day Sales) for each CUST_NUM
(Customer Number) separately
I am using the following statement:
Rank:
(SELECT Count (*)
FROM [Parts] as R
Where [CYTD Sales] > [Parts].[CYTD Sales]
And > CUST_NUM= [Parts].[CUST_NUM] ) + 1
I ran into situation when the same amount was spent for more than 1 part by same customer, so the ranking looks like this
1 2 4 4 5
instead of
1 2 3 4 5
Is there a way to write a statement that would not allow identical rankings for the same customer?
Thank you!