Hello guys,
i have a table with 3 columns of different dimensions and a column with values.
Sum_Value has the grouped Value by Dimension a.
Weight is different fo each Dimension a.
Now I'm searching for a methode which randomly allocate the Values until the Sum of this new column reached Sum_Value_Weighted.
Is there a way to do that?
| Dimension a | Dimension b | Dimension c | Value | Sum_Value | Weight | Sum_Value_Weighted | Output_Value (Example) | Output_Value (Example 2) |
| a1 | b1 | c1 | 3 | 9 | 0.4 | 4 | 1 | 2 |
| a1 | b2 | c1 | 2 | 9 | 0.4 | 4 | 1 | 0 |
| a1 | b3 | c1 | 1 | 9 | 0.4 | 4 | 0 | 1 |
| a1 | b1 | c2 | 1 | 9 | 0.4 | 4 | 1 | 1 |
| a1 | b2 | c2 | 1 | 9 | 0.4 | 4 | 0 | 0 |
| a1 | b3 | c2 | 1 | 9 | 0.4 | 4 | 1 | 0 |
| a2 | b1 | c1 | 2 | 7 | 0.8 | 6 | 2 | 2 |
| a2 | b2 | c1 | 1 | 7 | 0.8 | 6 | 1 | 0 |
| a2 | b1 | c2 | 2 | 7 | 0.8 | 6 | 1 | 2 |
| a2 | b2 | c2 | 2 | 7 | 0.8 | 6 | 2 | 2 |