Forum Discussion
Row-Wise Ranking of Values
Further Explanation:
1. I have a table which contains multiple attributes, such as "Clicks", "Impressions", etc.
2. For each of these attributes, there are scalar values which represent the sum of the `[VAL]` column for every month.
3. I want to rank these monthly values within each attribute, but not across them. This means:
- For the "Clicks" attribute: if Jan has a value of 12, Feb has 10, and March has 29, I want to rank them as Feb (1), Jan (2), March (3). This rank is isolated to just the "Clicks" attribute.
- The ranking restarts for the next attribute, say "Impressions". So, for "Impressions", if Jan has a value of 5, Feb has 15, and March has 8, the ranking would be Jan (1), March (2), Feb (3).
4. The end result should show ranks for each month within every attribute. This means the rank does not carry over from one attribute to the next, but starts anew.
In essence, I want a monthly rank for each attribute's values separately. The rank resets for each attribute, and is determined based on the monthly values of `[VAL]` for that attribute.