Team,
How can i calculate the ratio based on below logic.
1) if Indicator is - "C"and transaction type = ÜTS then my ratio is "0"
2) if indicator is D and transaction type is ="Stock then my ratio is 1 (i.e 2457000 / 2457000) (stock / UTS)
3) If indicator is "D" and transaction type is "WTS" then my ratio is 0.125 (i.e 307125 / 2457000) (WTS / UTS)
Also it should not overlap with other UID's .. Kindly advice ASAP. Thanks
| UID | Right_Quantity | Indicator | Transaction type | RATIO |
| KYG7484L1 | 2457000 | C | UTS | - |
| KYG7484L2 | 2457000 | D | Stock | 1 |
| KYG7484L3 | 307125 | D | WTS | 0.125 |
| US02369M1 | 50248 | C | UTS | - |
| US02369M2 | 50248 | D | Stock | 1 |
| US02369M3 | 25124 | D | WTS | 0.5 |