I have a transaction data containing 3 columns:
Quarter
Account
Sales Order
I need to insert rank columns wherein the condition is:
For an account whenever gets any Sales Order in a quarter, it should be assigned a rank for the line items for the quarter in ascending order of the quarter
Example1:
| Quarter | Account | Sales Order | Rank |
| 2024-Q3 | Alpha | 100 | 1 |
| 2024-Q3 | Alpha | 200 | 1 |
| 2025-Q2 | Alpha | 300 | 2 |
| 2025-Q3 | Alpha | 50 | 3 |
| 2025-Q4 | Alpha | 70 | 4 |
| 2026-Q2 | Alpha | 80 | 5 |
Example 2:
| Quarter | Account | Sales Order | Rank |
|---|---|---|---|
| 2024-Q2 | Beta | 50 | 1 |
| 2026-Q1 | Beta | 10 | 2 |
| 2026-Q2 | Beta | 20 | 3 |
Thanks in Advance!



