Hi All,
Pls assist me on this scenarios. Basically each product will have three different levels (i.e Level 1, Level2 & Level 3).
Scenario 1: If 2 out of 3 levels has values populated in it, then we need to create two duplicate line and split the values in both the lines.
Scenario 2 : If 3 out 3 levels has values populated in it, then we need to create three duplicate lines and split the value in each lines.
Note: Splitting values can be in any level, but it should be unique.
| Scenario 1 | | |
| Input |
| Product | Level 1 | Level 2 | Level 3 |
| A | 1 | 1 | 0 |
| | | | |
| Desired output |
| Product | Level 1 | Level 2 | Level 3 |
| A | 1 | 0 | 0 |
| A | 0 | 1 | 0 |
| Scenario 2 | | |
| Input |
| Product | Level 1 | Level 2 | Level 3 |
| A | 1 | 1 | 1 |
| | | | |
| Desired output |
| Product | Level 1 | Level 2 | Level 3 |
| A | 1 | 0 | 0 |
| A | 0 | 1 | 0 |
| A | 0 | 0 | 1 |