Split 100% randomly in 5 choices

Hi everyone,
I have a usecase where I need to randomly generate data for a bunch of locations
Each location offers 5 different products to sell so I need a way to distribute 100% into randomly sized parts which of course add up to 100% for each location

e.g.
Location1 P1 20%, P2 10%, P3 15%, P4 5%, P5 50%
Location2 P1 10%, P2,40%, P3:20%, P4 15%, P5 15%

and so on
any ideas on how to implement this efficiently?
Thanks and best regards

Hi @Daniel_Weikert,

I took a crack at this. It’s random but dependent on the previous random selection. Might give you a start from which you can modify to your liking.

Hope this helps,
JasonLocations_and_Parts.knwf (38.2 KB)

2 Likes

Hello @Daniel_Weikert,

this approach seems fine and easily done in KNIME:

And if sum is different than 100 shouldn’t be an issue to add/subtract to get it.

Br,
Ivan

3 Likes

Thanks a lot to both of you ( @ipazin as well)
Highly appreciate your input!
I will have a look at your approaches. They have to be better then my excel solution.

best regards and take care

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.