I need to make all the possible combinations(not permutations) with three numbers using excel queries.
I have six numbers in a column. From A1:A6. I need to make all the possible combinations(not permutations) with three numbers using excel queries. Please help..
If by "excel queries" you mean Power Query, here is a script that will do that:
Algorithm
=> 56 combinations (allowing repeats of numbers in the same combination)
Note that the code below could be generated from the Power Query User interface
Original Data

Combinations with Repeated Values

Edit to generalize the code
Please note that this code is inefficient for large sets, as it first generates all the Permutations, and then eliminates the non-valid values by sorting the rows and removing the duplicates.
For selections of 7 items out of a group of 8, the number of permutations is in excess of
2,000,000
which Excel Power Query does not handle efficiently, so it takes a while to run.The same code running on Power BI Desktop runs in one or two seconds
I have written it as a custom function named
fnCombos
Custom Function
Rename
fnCombos
Main Query