Hi,
This has been asked a lot but I can't adapt solutions to my needs.
I need to rank by brand the top & bottom variance but only if the sales & plan <> 0.
Sample data below with expected results
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>
This has been asked a lot but I can't adapt solutions to my needs.
I need to rank by brand the top & bottom variance but only if the sales & plan <> 0.
Sample data below with expected results
Brand | Sales | Plan | Var | Top Rank | Bottom Rank |
TS | 7,374 | 6,287 | 1,087 | 2 | 12 |
TS | 15,849 | 16,798 | -949 | 8 | 6 |
TM | 3,085 | 3,549 | -464 | 3 | 6 |
TM | 9,498 | 11,716 | -2,218 | 7 | 2 |
TS | 3,666 | 4,165 | -499 | 4 | 10 |
TS | 5,026 | 6,091 | -1,065 | 9 | 5 |
TS | 12,042 | 12,987 | -945 | 7 | 7 |
TS | 4,059 | 5,677 | -1,618 | 11 | 3 |
TM | 2,294 | 4,121 | -1,827 | 6 | 3 |
TS | 14,603 | 15,349 | -746 | 6 | 8 |
TM | 0 | 0 | 0 | - | - |
TM | 842 | 1,219 | -377 | 1 | 8 |
TM | 0 | 0 | 0 | - | - |
TS | 11,814 | 13,996 | -2,182 | 12 | 2 |
TS | 6,930 | 7,996 | -1,066 | 10 | 4 |
TS | 0 | 0 | 0 | - | - |
TM | 3,374 | 5,832 | -2,458 | 8 | 1 |
TS | 13,091 | 12,184 | 907 | 3 | 11 |
TS | 41,375 | 40,040 | 1,335 | 1 | 13 |
TM | 5,802 | 6,408 | -606 | 4 | 5 |
TM | 4,325 | 4,702 | -377 | 2 | 7 |
TM | 2,082 | 2,830 | -748 | 5 | 4 |
TS | 21,470 | 22,101 | -631 | 5 | 9 |
TS | 7,115 | 12,438 | -5,323 | 13 | 1 |
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>