Dear All,
here is my Case :
have a data contains Dates Monthly my concern is to rank the date (in the Script)
Objective: to compare this month with the previous month.
Case :
Account | Date | Product | Bucket |
1 | Dec-16 | Car L | 0 |
2 | Dec-16 | Car L | 1 |
1 | Jan-17 | Car L | 1 |
2 | Jan-17 | Car L | 0 |
1 | Feb-17 | Car L | 2 |
2 | Feb-17 | Car L | 1 |
Ranking:
Date | Rank |
Dec-16 | 1 |
Jan-17 | 2 |
Feb-17 | 3 |
Output:
Account | Bucket Current Month | Bucket Previous Month | Rank |
1 | 0 | 1 | 1 |
2 | 1 | 0 | 1 |
1 | 1 | 2 | 2 |
2 | 0 | 1 | 2 |
Hope you can help Thank you,