Forum Discussion
Create a Table with All Possible Combos from a Single Column and Data for Each Combo
- 4 years ago
See attached for a solution with SuperGroups
And here is the second part - calculating the averages
Is this what you are referring to with %CV?
- Anonymous4 years agoNot applicable
Sorry for the delayed response! Thank you for all this. I'm glad you think this is an interesting problem. I corrected the table in my original post. Also you're correct that the %CV is the standard deviation / average. Your solution worked perfectly based on the information I provided, so thank you! My exact situation is a little different though. So going one step up I don't need every combination ever across all entries, just related entries. Hopefully this table will help explain:
SuperGroup Group Value A 1 5
A 1 5 A 2 7 A 2 7 A 3 2 A 3 1 A 4 4 A 4 6 B 5 3 B 5 3 C 6 3 C 6 2 C 7 9 C 7 8 To shorten the table so it doesn't spiral out of control as more and more Groups come in, how can I only look at combos within a SuperGroup? Essentially I don't want Groups from SuperGroup A to have combos with Groups from SuperGroups B and C, and vice versa.
- lbendlin4 years agoSuper User
This increases the complexity of the ask by at least an order of magnitude. What you are basically asking is
"given a list of items, find all unique combinations across all the items in the list"
My previous solution proposal assumed that you had four items in your list, but now this is becoming a dynamic size. It will take some time to refactor the code for this.
- Anonymous4 years agoNot applicable
Yeah, I think that sounds about right. Basically for SuperGroup A, I'd like to see all combos of Groups 1,2,3,4; for SuperGroup B, all combos of Group 5 (so just one); and for SuperGroup C, all combos of Groups 6,7. There will never be more than four Groups in a SuperGroup though so at least the number of columns would be constant. Thanks for all the help with this!