Hi there! I am trying to finding out how to make different numbers hit a specific interval given from another table. The numbers should be rounded to the closest number and then a rank is attributed. My original dataset has 300k companies and 20 financial ratios.
We have two input tables that look like this:
1) Financial ratios for each company
| Company | Company financial ratio |
A | 0.05 |
| B | 0.14 |
| C | 0.15 |
| D | 0.16 |
| E | 0.24 |
2)
| Global financial ratio | Rank classification |
| 0.05 | 1 |
| 0.1 | 2 |
| 0.2 | 3 |
| 0.3 | 4 |
Output table:
| Company | Rank classification |
| A | 1 |
| B | 2 |
| C | 3 |
| D | 3 |
| E | 3 |
So the goal is to match the financial ratio for each company with a rank classification, according to the interval where it belongs. The financial ratio is rounded to the closest value.
Thank you in advance!